diff --git a/Modules/Dashboard/Content.qml b/Modules/Dashboard/Content.qml index 7000583..c05e0c4 100644 --- a/Modules/Dashboard/Content.qml +++ b/Modules/Dashboard/Content.qml @@ -75,6 +75,7 @@ Item { index: 0 sourceComponent: Dash { state: root.state + visibilities: root.visibilities } } } diff --git a/Modules/Dashboard/Dash.qml b/Modules/Dashboard/Dash.qml index 3d9b684..5e42e10 100644 --- a/Modules/Dashboard/Dash.qml +++ b/Modules/Dashboard/Dash.qml @@ -1,4 +1,5 @@ import Quickshell +import QtQuick import QtQuick.Layouts import qs.Helpers import qs.Components @@ -10,11 +11,52 @@ import qs.Modules.Dashboard.Dash GridLayout { id: root + required property PersistentProperties visibilities required property PersistentProperties state + readonly property bool dashboardVisible: visibilities.dashboard rowSpacing: Appearance.spacing.normal columnSpacing: Appearance.spacing.normal + opacity: 0 + scale: 0.9 + + onDashboardVisibleChanged: { + if (dashboardVisible) { + openAnim.start(); + } else { + closeAnim.start(); + } + } + + ParallelAnimation { + id: openAnim + Anim { + target: root + property: "opacity" + to: 1 + } + Anim { + target: root + property: "scale" + to: 1 + } + } + + ParallelAnimation { + id: closeAnim + Anim { + target: root + property: "opacity" + to: 0 + } + Anim { + target: root + property: "scale" + to: 0.9 + } + } + Rect { Layout.column: 2 Layout.columnSpan: 3 diff --git a/Modules/Dashboard/Dash/Calendar.qml b/Modules/Dashboard/Dash/Calendar.qml index fac5815..277278f 100644 --- a/Modules/Dashboard/Dash/Calendar.qml +++ b/Modules/Dashboard/Dash/Calendar.qml @@ -141,7 +141,7 @@ CustomMouseArea { horizontalAlignment: Text.AlignHCenter text: model.shortName font.weight: 500 - color: (model.day === 0 || model.day === 6) ? DynamicColors.palette.m3secondary : DynamicColors.palette.m3onSurfaceVariant + color: (model.day === 0) ? DynamicColors.palette.m3secondary : DynamicColors.palette.m3onSurfaceVariant } } @@ -158,7 +158,7 @@ CustomMouseArea { anchors.fill: parent spacing: 3 - locale: Qt.locale() + locale: Qt.locale("en_SE") delegate: Item { id: dayItem @@ -177,7 +177,7 @@ CustomMouseArea { text: grid.locale.toString(dayItem.model.day) color: { const dayOfWeek = dayItem.model.date.getUTCDay(); - if (dayOfWeek === 0 || dayOfWeek === 6) + if (dayOfWeek === 6) return DynamicColors.palette.m3secondary; return DynamicColors.palette.m3onSurfaceVariant; diff --git a/Modules/Dashboard/Dash/Weather.qml b/Modules/Dashboard/Dash/Weather.qml index ec64811..ef8cb76 100644 --- a/Modules/Dashboard/Dash/Weather.qml +++ b/Modules/Dashboard/Dash/Weather.qml @@ -21,7 +21,7 @@ Item { animate: true text: Weather.icon color: DynamicColors.palette.m3secondary - font.pointSize: 24 + font.pointSize: 54 } Column { @@ -29,6 +29,7 @@ Item { anchors.verticalCenter: parent.verticalCenter anchors.left: icon.right + anchors.leftMargin: Appearance.spacing.large spacing: 8 diff --git a/Modules/Dashboard/Wrapper.qml b/Modules/Dashboard/Wrapper.qml index 5e9b0cb..123972f 100644 --- a/Modules/Dashboard/Wrapper.qml +++ b/Modules/Dashboard/Wrapper.qml @@ -49,8 +49,8 @@ Item { Modules.Anim { target: root property: "implicitHeight" - duration: Appearance.anim.durations.expressiveDefaultSpatial - easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial + duration: MaterialEasing.expressiveEffectsTime + easing.bezierCurve: MaterialEasing.expressiveEffects } }, Transition { @@ -60,7 +60,7 @@ Item { Modules.Anim { target: root property: "implicitHeight" - easing.bezierCurve: Appearance.anim.curves.emphasized + easing.bezierCurve: MaterialEasing.expressiveEffects } } ]