left-bar working, bottom bar semi-broken

This commit is contained in:
2026-08-14 16:31:52 +02:00
parent 1d150292d3
commit 4517e5ecd0
28 changed files with 404 additions and 168 deletions
+22 -11
View File
@@ -12,12 +12,14 @@ import qs.Components
CustomRect {
id: root
required property bool horizontal
required property PersistentProperties visibilities
anchors.fill: parent
clip: true
color: visibilities.resources ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer
implicitHeight: Config.bar.height + Appearance.padding.smallest * 2
implicitWidth: rowLayout.implicitWidth + Appearance.padding.larger * 2
implicitHeight: horizontal ? Config.bar.height + Appearance.padding.smallest * 2 : gridLayout.implicitHeight + Appearance.padding.normal * 2
implicitWidth: horizontal ? gridLayout.implicitWidth + Appearance.padding.larger * 2 : Config.bar.height
radius: Appearance.rounding.full
StateLayer {
@@ -26,13 +28,14 @@ CustomRect {
onClicked: root.visibilities.resources = !root.visibilities.resources
}
RowLayout {
id: rowLayout
GridLayout {
id: gridLayout
anchors.centerIn: parent
anchors.horizontalCenterOffset: -2
implicitHeight: root.implicitHeight
spacing: Appearance.spacing.smaller
anchors.horizontalCenterOffset: root.horizontal ? 0 : 1
anchors.verticalCenterOffset: root.horizontal ? 0 : -3
columnSpacing: Appearance.spacing.smaller
columns: root.horizontal ? -1 : 1
ServiceRef {
service: Gpu
@@ -48,7 +51,9 @@ CustomRect {
Resource {
Layout.alignment: Qt.AlignVCenter
Layout.fillHeight: true
Layout.fillHeight: root.horizontal
Layout.fillWidth: !root.horizontal
horizontal: root.horizontal
icon: "memory"
iconColor: root.visibilities.resources ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
mainColor: root.visibilities.resources ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3primary
@@ -57,7 +62,9 @@ CustomRect {
}
Resource {
Layout.fillHeight: true
Layout.fillHeight: root.horizontal
Layout.fillWidth: !root.horizontal
horizontal: root.horizontal
icon: "memory_alt"
iconColor: root.visibilities.resources ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
mainColor: root.visibilities.resources ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3secondary
@@ -66,7 +73,9 @@ CustomRect {
}
Resource {
Layout.fillHeight: true
Layout.fillHeight: root.horizontal
Layout.fillWidth: !root.horizontal
horizontal: root.horizontal
icon: "gamepad"
iconColor: root.visibilities.resources ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
mainColor: root.visibilities.resources ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3tertiary
@@ -74,7 +83,9 @@ CustomRect {
}
Resource {
Layout.fillHeight: true
Layout.fillHeight: root.horizontal
Layout.fillWidth: !root.horizontal
horizontal: root.horizontal
icon: "developer_board"
iconColor: root.visibilities.resources ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
mainColor: root.visibilities.resources ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3primary