forked from Shinonome/dots-hyprland
bar: battery indicator: remove useless RowLayout
This commit is contained in:
@@ -13,19 +13,14 @@ MouseArea {
|
|||||||
readonly property real percentage: Battery.percentage
|
readonly property real percentage: Battery.percentage
|
||||||
readonly property bool isLow: percentage <= Config.options.battery.low / 100
|
readonly property bool isLow: percentage <= Config.options.battery.low / 100
|
||||||
|
|
||||||
implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2
|
implicitWidth: batteryProgress.implicitWidth
|
||||||
implicitHeight: Appearance.sizes.barHeight
|
implicitHeight: Appearance.sizes.barHeight
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: rowLayout
|
|
||||||
|
|
||||||
spacing: 4
|
|
||||||
anchors.centerIn: parent
|
|
||||||
|
|
||||||
ClippedProgressBar {
|
ClippedProgressBar {
|
||||||
id: batteryProgress
|
id: batteryProgress
|
||||||
|
anchors.centerIn: parent
|
||||||
value: percentage
|
value: percentage
|
||||||
highlightColor: (isLow && !isCharging) ? Appearance.m3colors.m3error : Appearance.colors.colOnSecondaryContainer
|
highlightColor: (isLow && !isCharging) ? Appearance.m3colors.m3error : Appearance.colors.colOnSecondaryContainer
|
||||||
|
|
||||||
@@ -56,7 +51,6 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
BatteryPopup {
|
BatteryPopup {
|
||||||
id: batteryPopup
|
id: batteryPopup
|
||||||
|
|||||||
Reference in New Issue
Block a user