dashboard
This commit is contained in:
@@ -75,6 +75,7 @@ Item {
|
||||
index: 0
|
||||
sourceComponent: Dash {
|
||||
state: root.state
|
||||
visibilities: root.visibilities
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user