bars: refractor bar groups

This commit is contained in:
end-4
2025-08-15 22:49:43 +07:00
parent 9fc0d26eb5
commit d05c451294
5 changed files with 26 additions and 59 deletions
@@ -15,8 +15,6 @@ MouseArea {
readonly property bool isLow: percentage <= Config.options.battery.low / 100
implicitHeight: batteryProgress.implicitHeight
implicitWidth: Appearance.sizes.verticalBarGroupWidth
hoverEnabled: true
ClippedProgressBar {
@@ -150,7 +150,8 @@ Item { // Bar content region
anchors.centerIn: parent
spacing: 4
VerticalBarGroup {
Bar.BarGroup {
vertical: true
padding: 8
Resources {
Layout.fillWidth: true
@@ -162,8 +163,9 @@ Item { // Bar content region
visible: Config.options?.bar.borderless
}
VerticalBarGroup {
Bar.BarGroup {
id: middleCenterGroup
vertical: true
padding: 6
Layout.fillHeight: true
@@ -187,7 +189,8 @@ Item { // Bar content region
visible: Config.options?.bar.borderless
}
VerticalBarGroup {
Bar.BarGroup {
vertical: true
padding: 8
VerticalClockWidget {
@@ -1,37 +0,0 @@
import qs.modules.common
import QtQuick
import QtQuick.Layouts
Item {
id: root
property real padding: 5
implicitWidth: Appearance.sizes.baseVerticalBarWidth
width: Appearance.sizes.verticalBarWidth
implicitHeight: columnLayout.implicitHeight + padding * 2
default property alias items: columnLayout.children
Rectangle {
id: background
anchors {
fill: parent
leftMargin: 4
rightMargin: 4
}
color: Config.options?.bar.borderless ? "transparent" : Appearance.colors.colLayer1
radius: Appearance.rounding.small
}
ColumnLayout {
id: columnLayout
anchors {
horizontalCenter: parent.horizontalCenter
top: parent.top
bottom: parent.bottom
topMargin: root.padding
bottomMargin: root.padding
}
spacing: 12
// Children defined by `items` prop
}
}