mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-09 06:58:29 -04:00
fix(dankdash): update tabIndex reordering for media & weather widgets
- Fixes #2762
This commit is contained in:
@@ -1129,12 +1129,13 @@ Item {
|
|||||||
parentScreen: barWindow.screen
|
parentScreen: barWindow.screen
|
||||||
onClicked: {
|
onClicked: {
|
||||||
const section = topBarContent.getWidgetSection(parent) || "center";
|
const section = topBarContent.getWidgetSection(parent) || "center";
|
||||||
|
const tabIndex = SettingsData.dashTabIndexForId("media");
|
||||||
topBarContent.openWidgetPopout({
|
topBarContent.openWidgetPopout({
|
||||||
loader: dankDashPopoutLoader,
|
loader: dankDashPopoutLoader,
|
||||||
widgetItem: mediaWidget,
|
widgetItem: mediaWidget,
|
||||||
section,
|
section,
|
||||||
tabIndex: 1,
|
tabIndex,
|
||||||
triggerSource: topBarContent._dashTriggerSource(section, 1),
|
triggerSource: topBarContent._dashTriggerSource(section, tabIndex),
|
||||||
mode: "click",
|
mode: "click",
|
||||||
useCenterSection: true,
|
useCenterSection: true,
|
||||||
setTriggerScreen: true
|
setTriggerScreen: true
|
||||||
@@ -1156,12 +1157,13 @@ Item {
|
|||||||
parentScreen: barWindow.screen
|
parentScreen: barWindow.screen
|
||||||
onClicked: {
|
onClicked: {
|
||||||
const section = topBarContent.getWidgetSection(parent) || "center";
|
const section = topBarContent.getWidgetSection(parent) || "center";
|
||||||
|
const tabIndex = SettingsData.dashTabIndexForId("weather");
|
||||||
topBarContent.openWidgetPopout({
|
topBarContent.openWidgetPopout({
|
||||||
loader: dankDashPopoutLoader,
|
loader: dankDashPopoutLoader,
|
||||||
widgetItem: weatherWidget,
|
widgetItem: weatherWidget,
|
||||||
section,
|
section,
|
||||||
tabIndex: 3,
|
tabIndex,
|
||||||
triggerSource: topBarContent._dashTriggerSource(section, 3),
|
triggerSource: topBarContent._dashTriggerSource(section, tabIndex),
|
||||||
mode: "click",
|
mode: "click",
|
||||||
useCenterSection: true,
|
useCenterSection: true,
|
||||||
setTriggerScreen: true
|
setTriggerScreen: true
|
||||||
|
|||||||
@@ -736,7 +736,7 @@ Item {
|
|||||||
case "music":
|
case "music":
|
||||||
case "weather":
|
case "weather":
|
||||||
{
|
{
|
||||||
const tabIndex = widgetId === "clock" ? 0 : (widgetId === "music" ? 1 : 3);
|
const tabIndex = widgetId === "clock" ? 0 : SettingsData.dashTabIndexForId(widgetId === "music" ? "media" : "weather");
|
||||||
return barContent.openWidgetPopout(Object.assign({}, base, {
|
return barContent.openWidgetPopout(Object.assign({}, base, {
|
||||||
loader,
|
loader,
|
||||||
tabIndex,
|
tabIndex,
|
||||||
|
|||||||
Reference in New Issue
Block a user