forked from Shinonome/dots-hyprland
bars: refractor bar groups
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user