mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-27 15:02:50 -05:00
DankDash: Replace CentCom center with a new widget
This commit is contained in:
@@ -161,7 +161,7 @@ PanelWindow {
|
||||
"loader": appDrawerLoader,
|
||||
"prop": "shouldBeVisible"
|
||||
}, {
|
||||
"loader": centcomPopoutLoader,
|
||||
"loader": dankDashPopoutLoader,
|
||||
"prop": "shouldBeVisible"
|
||||
}, {
|
||||
"loader": processListPopoutLoader,
|
||||
@@ -415,7 +415,7 @@ PanelWindow {
|
||||
property var centerWidgets: []
|
||||
property int totalWidgets: 0
|
||||
property real totalWidth: 0
|
||||
property real spacing: SettingsData.topBarNoBackground ? 2 : Theme.spacingS
|
||||
property real spacing: SettingsData.topBarNoBackground ? 2 : Theme.spacingXS
|
||||
|
||||
function updateLayout() {
|
||||
if (width <= 0 || height <= 0 || !visible) {
|
||||
@@ -678,14 +678,15 @@ PanelWindow {
|
||||
widgetHeight: root.widgetHeight
|
||||
section: topBarContent.getWidgetSection(parent) || "center"
|
||||
popupTarget: {
|
||||
centcomPopoutLoader.active = true
|
||||
return centcomPopoutLoader.item
|
||||
dankDashPopoutLoader.active = true
|
||||
return dankDashPopoutLoader.item
|
||||
}
|
||||
parentScreen: root.screen
|
||||
onClockClicked: {
|
||||
centcomPopoutLoader.active = true
|
||||
if (centcomPopoutLoader.item) {
|
||||
centcomPopoutLoader.item.calendarVisible = !centcomPopoutLoader.item.calendarVisible
|
||||
dankDashPopoutLoader.active = true
|
||||
if (dankDashPopoutLoader.item) {
|
||||
dankDashPopoutLoader.item.calendarVisible = !dankDashPopoutLoader.item.calendarVisible
|
||||
dankDashPopoutLoader.item.currentTabIndex = 0 // Overview tab
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -700,14 +701,15 @@ PanelWindow {
|
||||
widgetHeight: root.widgetHeight
|
||||
section: topBarContent.getWidgetSection(parent) || "center"
|
||||
popupTarget: {
|
||||
centcomPopoutLoader.active = true
|
||||
return centcomPopoutLoader.item
|
||||
dankDashPopoutLoader.active = true
|
||||
return dankDashPopoutLoader.item
|
||||
}
|
||||
parentScreen: root.screen
|
||||
onClicked: {
|
||||
centcomPopoutLoader.active = true
|
||||
if (centcomPopoutLoader.item) {
|
||||
centcomPopoutLoader.item.calendarVisible = !centcomPopoutLoader.item.calendarVisible
|
||||
dankDashPopoutLoader.active = true
|
||||
if (dankDashPopoutLoader.item) {
|
||||
dankDashPopoutLoader.item.calendarVisible = !dankDashPopoutLoader.item.calendarVisible
|
||||
dankDashPopoutLoader.item.currentTabIndex = 1 // Media tab
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -721,14 +723,15 @@ PanelWindow {
|
||||
widgetHeight: root.widgetHeight
|
||||
section: topBarContent.getWidgetSection(parent) || "center"
|
||||
popupTarget: {
|
||||
centcomPopoutLoader.active = true
|
||||
return centcomPopoutLoader.item
|
||||
dankDashPopoutLoader.active = true
|
||||
return dankDashPopoutLoader.item
|
||||
}
|
||||
parentScreen: root.screen
|
||||
onClicked: {
|
||||
centcomPopoutLoader.active = true
|
||||
if (centcomPopoutLoader.item) {
|
||||
centcomPopoutLoader.item.calendarVisible = !centcomPopoutLoader.item.calendarVisible
|
||||
dankDashPopoutLoader.active = true
|
||||
if (dankDashPopoutLoader.item) {
|
||||
dankDashPopoutLoader.item.calendarVisible = !dankDashPopoutLoader.item.calendarVisible
|
||||
dankDashPopoutLoader.item.currentTabIndex = 2 // Weather tab
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user