mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
remove old remnants from when it was just a calendar
This commit is contained in:
@@ -12,7 +12,7 @@ import qs.Modules.DankDash
|
|||||||
DankPopout {
|
DankPopout {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property bool calendarVisible: false
|
property bool dashVisible: false
|
||||||
property string triggerSection: "center"
|
property string triggerSection: "center"
|
||||||
property var triggerScreen: null
|
property var triggerScreen: null
|
||||||
property int currentTabIndex: 0
|
property int currentTabIndex: 0
|
||||||
@@ -38,11 +38,11 @@ DankPopout {
|
|||||||
triggerWidth: 80
|
triggerWidth: 80
|
||||||
positioning: "center"
|
positioning: "center"
|
||||||
screen: triggerScreen
|
screen: triggerScreen
|
||||||
shouldBeVisible: calendarVisible
|
shouldBeVisible: dashVisible
|
||||||
visible: shouldBeVisible
|
visible: shouldBeVisible
|
||||||
|
|
||||||
onCalendarVisibleChanged: {
|
onDashVisibleChanged: {
|
||||||
if (calendarVisible) {
|
if (dashVisible) {
|
||||||
open()
|
open()
|
||||||
} else {
|
} else {
|
||||||
close()
|
close()
|
||||||
@@ -50,7 +50,7 @@ DankPopout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onBackgroundClicked: {
|
onBackgroundClicked: {
|
||||||
calendarVisible = false
|
dashVisible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
content: Component {
|
content: Component {
|
||||||
@@ -70,7 +70,7 @@ DankPopout {
|
|||||||
|
|
||||||
Keys.onPressed: function(event) {
|
Keys.onPressed: function(event) {
|
||||||
if (event.key === Qt.Key_Escape) {
|
if (event.key === Qt.Key_Escape) {
|
||||||
root.close()
|
root.dashVisible = false
|
||||||
event.accepted = true
|
event.accepted = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -685,7 +685,7 @@ PanelWindow {
|
|||||||
onClockClicked: {
|
onClockClicked: {
|
||||||
dankDashPopoutLoader.active = true
|
dankDashPopoutLoader.active = true
|
||||||
if (dankDashPopoutLoader.item) {
|
if (dankDashPopoutLoader.item) {
|
||||||
dankDashPopoutLoader.item.calendarVisible = !dankDashPopoutLoader.item.calendarVisible
|
dankDashPopoutLoader.item.dashVisible = !dankDashPopoutLoader.item.dashVisible
|
||||||
dankDashPopoutLoader.item.currentTabIndex = 0 // Overview tab
|
dankDashPopoutLoader.item.currentTabIndex = 0 // Overview tab
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -708,7 +708,7 @@ PanelWindow {
|
|||||||
onClicked: {
|
onClicked: {
|
||||||
dankDashPopoutLoader.active = true
|
dankDashPopoutLoader.active = true
|
||||||
if (dankDashPopoutLoader.item) {
|
if (dankDashPopoutLoader.item) {
|
||||||
dankDashPopoutLoader.item.calendarVisible = !dankDashPopoutLoader.item.calendarVisible
|
dankDashPopoutLoader.item.dashVisible = !dankDashPopoutLoader.item.dashVisible
|
||||||
dankDashPopoutLoader.item.currentTabIndex = 1 // Media tab
|
dankDashPopoutLoader.item.currentTabIndex = 1 // Media tab
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -730,7 +730,7 @@ PanelWindow {
|
|||||||
onClicked: {
|
onClicked: {
|
||||||
dankDashPopoutLoader.active = true
|
dankDashPopoutLoader.active = true
|
||||||
if (dankDashPopoutLoader.item) {
|
if (dankDashPopoutLoader.item) {
|
||||||
dankDashPopoutLoader.item.calendarVisible = !dankDashPopoutLoader.item.calendarVisible
|
dankDashPopoutLoader.item.dashVisible = !dankDashPopoutLoader.item.dashVisible
|
||||||
dankDashPopoutLoader.item.currentTabIndex = 2 // Weather tab
|
dankDashPopoutLoader.item.currentTabIndex = 2 // Weather tab
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
15
shell.qml
15
shell.qml
@@ -72,11 +72,6 @@ ShellRoot {
|
|||||||
sourceComponent: Component {
|
sourceComponent: Component {
|
||||||
DankDashPopout {
|
DankDashPopout {
|
||||||
id: dankDashPopout
|
id: dankDashPopout
|
||||||
|
|
||||||
// Ensure it starts invisible
|
|
||||||
Component.onCompleted: {
|
|
||||||
calendarVisible = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -408,7 +403,7 @@ ShellRoot {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
dankDashPopoutLoader.item.setTriggerPosition(Screen.width / 2, Theme.barHeight + Theme.spacingS, 100, "center", Screen)
|
dankDashPopoutLoader.item.setTriggerPosition(Screen.width / 2, Theme.barHeight + Theme.spacingS, 100, "center", Screen)
|
||||||
dankDashPopoutLoader.item.calendarVisible = true
|
dankDashPopoutLoader.item.dashVisible = true
|
||||||
return "DASH_OPEN_SUCCESS"
|
return "DASH_OPEN_SUCCESS"
|
||||||
}
|
}
|
||||||
return "DASH_OPEN_FAILED"
|
return "DASH_OPEN_FAILED"
|
||||||
@@ -416,7 +411,7 @@ ShellRoot {
|
|||||||
|
|
||||||
function close(): string {
|
function close(): string {
|
||||||
if (dankDashPopoutLoader.item) {
|
if (dankDashPopoutLoader.item) {
|
||||||
dankDashPopoutLoader.item.calendarVisible = false
|
dankDashPopoutLoader.item.dashVisible = false
|
||||||
return "DASH_CLOSE_SUCCESS"
|
return "DASH_CLOSE_SUCCESS"
|
||||||
}
|
}
|
||||||
return "DASH_CLOSE_FAILED"
|
return "DASH_CLOSE_FAILED"
|
||||||
@@ -425,8 +420,8 @@ ShellRoot {
|
|||||||
function toggle(tab: string): string {
|
function toggle(tab: string): string {
|
||||||
dankDashPopoutLoader.active = true
|
dankDashPopoutLoader.active = true
|
||||||
if (dankDashPopoutLoader.item) {
|
if (dankDashPopoutLoader.item) {
|
||||||
if (dankDashPopoutLoader.item.calendarVisible) {
|
if (dankDashPopoutLoader.item.dashVisible) {
|
||||||
dankDashPopoutLoader.item.calendarVisible = false
|
dankDashPopoutLoader.item.dashVisible = false
|
||||||
} else {
|
} else {
|
||||||
switch (tab.toLowerCase()) {
|
switch (tab.toLowerCase()) {
|
||||||
case "media":
|
case "media":
|
||||||
@@ -440,7 +435,7 @@ ShellRoot {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
dankDashPopoutLoader.item.setTriggerPosition(Screen.width / 2, Theme.barHeight + Theme.spacingS, 100, "center", Screen)
|
dankDashPopoutLoader.item.setTriggerPosition(Screen.width / 2, Theme.barHeight + Theme.spacingS, 100, "center", Screen)
|
||||||
dankDashPopoutLoader.item.calendarVisible = true
|
dankDashPopoutLoader.item.dashVisible = true
|
||||||
}
|
}
|
||||||
return "DASH_TOGGLE_SUCCESS"
|
return "DASH_TOGGLE_SUCCESS"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user