diff --git a/configuration/modules/dots/quick_shell/config/CalendarPopup.qml b/configuration/modules/dots/quick_shell/config/CalendarPopup.qml new file mode 100644 index 0000000..ef0fe78 --- /dev/null +++ b/configuration/modules/dots/quick_shell/config/CalendarPopup.qml @@ -0,0 +1,39 @@ +pragma ComponentBehavior: Bound + +import Quickshell +import QtQuick + +PanelWindow { + id: calendarPopup + + required property bool expanderOpen + required property color bgColor + required property color recColor + required property int recRadius + required property int barWidth + + anchors.left: true + anchors.bottom: true + implicitWidth: (expanderOpen || popupAnim.running) ? 160 : 0 + implicitHeight: (expanderOpen || popupAnim.running) ? 1400 : 0 + color: "transparent" + + Rectangle { + id: popupRectangle + + y: calendarPopup.height - height + x: calendarPopup.expanderOpen ? 0 : -(width + calendarPopup.barWidth) + width: 160 + height: 140 + color: calendarPopup.bgColor + + Behavior on x { + NumberAnimation { + id: popupAnim + + duration: 400 + easing.type: Easing.OutCubic + } + } + } +} diff --git a/configuration/modules/dots/quick_shell/config/PowerPopup.qml b/configuration/modules/dots/quick_shell/config/PowerPopup.qml index af8a325..8998820 100644 --- a/configuration/modules/dots/quick_shell/config/PowerPopup.qml +++ b/configuration/modules/dots/quick_shell/config/PowerPopup.qml @@ -15,12 +15,12 @@ PanelWindow { anchors.left: true anchors.bottom: true - implicitWidth: (expanderOpen || powerAnim.running) ? 140 : 0 - implicitHeight: (expanderOpen || powerAnim.running) ? 100 : 0 + implicitWidth: (expanderOpen || popupAnim.running) ? 140 : 0 + implicitHeight: (expanderOpen || popupAnim.running) ? 100 : 0 color: "transparent" Rectangle { - id: powerRectangle + id: popupRectangle y: parent.height - height x: powerPopup.expanderOpen ? 0 : -(width + powerPopup.barWidth) @@ -30,7 +30,7 @@ PanelWindow { Behavior on x { NumberAnimation { - id: powerAnim + id: popupAnim duration: 400 easing.type: Easing.OutCubic @@ -38,7 +38,7 @@ PanelWindow { } Row { - anchors.centerIn: powerRectangle + anchors.centerIn: popupRectangle spacing: 10 Rectangle { diff --git a/configuration/modules/dots/quick_shell/config/SideBar.qml b/configuration/modules/dots/quick_shell/config/SideBar.qml index eef6000..adc24f5 100644 --- a/configuration/modules/dots/quick_shell/config/SideBar.qml +++ b/configuration/modules/dots/quick_shell/config/SideBar.qml @@ -18,7 +18,8 @@ PanelWindow { required property int myMargin required property int edgeMargin - required property bool expanderOpen + required property bool powerExpanderOpen + required property bool calendarExpanderOpen anchors.top: true anchors.left: true @@ -98,6 +99,13 @@ PanelWindow { implicitWidth: sideBar.recLength radius: sideBar.recRadius color: sideBar.recColor + property real hello: time.y + + Button { + anchors.fill: parent + opacity: 0 + onClicked: sideBar.calendarExpanderOpen = !sideBar.calendarExpanderOpen + } Text { anchors.centerIn: parent @@ -122,7 +130,7 @@ PanelWindow { Button { anchors.fill: parent opacity: 0 - onClicked: sideBar.expanderOpen = !sideBar.expanderOpen + onClicked: sideBar.powerExpanderOpen = !sideBar.powerExpanderOpen } Image { diff --git a/configuration/modules/dots/quick_shell/config/shell.qml b/configuration/modules/dots/quick_shell/config/shell.qml index 91d894c..4f51db1 100644 --- a/configuration/modules/dots/quick_shell/config/shell.qml +++ b/configuration/modules/dots/quick_shell/config/shell.qml @@ -28,7 +28,8 @@ ShellRoot { id: delegate required property var modelData - property bool expanderOpen: false + property bool powerExpanderOpen: false + property bool calendarExpanderOpen: false SideBar { clock: clock @@ -42,13 +43,26 @@ ShellRoot { recLength: root.recLength myMargin: root.myMargin edgeMargin: root.edgeMargin - expanderOpen: delegate.expanderOpen - onExpanderOpenChanged: delegate.expanderOpen = expanderOpen + + powerExpanderOpen: delegate.powerExpanderOpen + onPowerExpanderOpenChanged: delegate.powerExpanderOpen = powerExpanderOpen + + calendarExpanderOpen: delegate.calendarExpanderOpen + onCalendarExpanderOpenChanged: delegate.calendarExpanderOpen = calendarExpanderOpen } PowerPopup { screen: delegate.modelData - expanderOpen: delegate.expanderOpen + expanderOpen: delegate.powerExpanderOpen + bgColor: root.bgColor + recColor: root.recColor + recRadius: root.recRadius + barWidth: root.barWidth + } + + CalendarPopup { + screen: delegate.modelData + expanderOpen: delegate.calendarExpanderOpen bgColor: root.bgColor recColor: root.recColor recRadius: root.recRadius