dashboard on right, change trigger to clock

This commit is contained in:
Zacharias-Brohn
2026-02-14 12:22:10 +01:00
parent a645c28d4f
commit df1d877c8f
12 changed files with 99 additions and 87 deletions
+3 -34
View File
@@ -25,12 +25,12 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.margins: Appearance.padding.large
anchors.margins: Appearance.padding.smaller
radius: 8
radius: 6
color: "transparent"
Flickable {
Item {
id: view
readonly property int currentIndex: root.state.currentTab
@@ -38,36 +38,9 @@ Item {
anchors.fill: parent
flickableDirection: Flickable.HorizontalFlick
implicitWidth: currentItem.implicitWidth
implicitHeight: currentItem.implicitHeight
contentX: currentItem.x
contentWidth: row.implicitWidth
contentHeight: row.implicitHeight
onContentXChanged: {
if (!moving)
return;
const x = contentX - currentItem.x;
if (x > currentItem.implicitWidth / 2)
root.state.currentTab = Math.min(root.state.currentTab + 1, tabs.count - 1);
else if (x < -currentItem.implicitWidth / 2)
root.state.currentTab = Math.max(root.state.currentTab - 1, 0);
}
onDragEnded: {
const x = contentX - currentItem.x;
if (x > currentItem.implicitWidth / 10)
root.state.currentTab = Math.min(root.state.currentTab + 1, tabs.count - 1);
else if (x < -currentItem.implicitWidth / 10)
root.state.currentTab = Math.max(root.state.currentTab - 1, 0);
else
contentX = Qt.binding(() => currentItem.x);
}
RowLayout {
id: row
@@ -79,10 +52,6 @@ Item {
}
}
}
Behavior on contentX {
Anim {}
}
}
}
+23 -20
View File
@@ -15,8 +15,10 @@ GridLayout {
required property PersistentProperties state
readonly property bool dashboardVisible: visibilities.dashboard
rowSpacing: Appearance.spacing.normal
columnSpacing: Appearance.spacing.normal
property int radius: 6
rowSpacing: Appearance.spacing.smaller
columnSpacing: Appearance.spacing.smaller
opacity: 0
scale: 0.9
@@ -63,7 +65,7 @@ GridLayout {
Layout.preferredWidth: user.implicitWidth
Layout.preferredHeight: user.implicitHeight
radius: 6
radius: root.radius
User {
id: user
@@ -78,31 +80,31 @@ GridLayout {
Layout.preferredWidth: Config.dashboard.sizes.weatherWidth
Layout.fillHeight: true
radius: 6
radius: root.radius
Weather {}
}
Rect {
Layout.row: 1
Layout.preferredWidth: dateTime.implicitWidth
Layout.fillHeight: true
radius: 6
DateTime {
id: dateTime
}
}
// Rect {
// Layout.row: 1
// Layout.preferredWidth: dateTime.implicitWidth
// Layout.fillHeight: true
//
// radius: root.radius
//
// DateTime {
// id: dateTime
// }
// }
Rect {
Layout.row: 1
Layout.column: 1
Layout.column: 0
Layout.columnSpan: 3
Layout.fillWidth: true
Layout.preferredHeight: calendar.implicitHeight
radius: 6
radius: root.radius
Calendar {
id: calendar
@@ -113,11 +115,12 @@ GridLayout {
Rect {
Layout.row: 1
Layout.column: 4
Layout.column: 3
Layout.columnSpan: 2
Layout.preferredWidth: resources.implicitWidth
Layout.fillHeight: true
radius: 6
radius: root.radius
Resources {
id: resources
@@ -131,7 +134,7 @@ GridLayout {
Layout.preferredWidth: media.implicitWidth
Layout.fillHeight: true
radius: 6
radius: root.radius
Media {
id: media
+13 -1
View File
@@ -11,7 +11,7 @@ Row {
anchors.bottom: parent.bottom
padding: Appearance.padding.large
spacing: Appearance.spacing.normal
spacing: Appearance.spacing.large
Ref {
service: SystemUsage
@@ -29,6 +29,18 @@ Row {
color: DynamicColors.palette.m3secondary
}
Resource {
icon: "gamepad"
value: SystemUsage.gpuPerc
color: DynamicColors.palette.m3primaryFixed
}
Resource {
icon: "host"
value: SystemUsage.gpuMemUsed
color: DynamicColors.palette.m3secondaryFixed
}
Resource {
icon: "hard_disk"
value: SystemUsage.storagePerc