feat: refactor bar spacing functions to use dedicated functions

This commit is contained in:
Hannes
2026-09-01 13:52:03 +02:00
parent 36486179d5
commit 764f8197fb
13 changed files with 47 additions and 36 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ import "../states/Battery"
MouseArea {
id: batteryButton
width: expanded ? Math.max(expandedRow.width + Config.spacing_fun(height)*3, bar.height) : Math.max(batteryText.width + Config.spacing_fun(height)*2, bar.height)
width: expanded ? Math.max(expandedRow.width + Config.bar_spacing_fun(height)*3, bar.height) : Math.max(batteryText.width + Config.bar_spacing_fun(height)*2, bar.height)
height: bar.height
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
@@ -63,7 +63,7 @@ MouseArea {
id: expandedRow
visible: expanded
anchors.centerIn: parent
spacing: Config.spacing_fun(batteryButton.height)
spacing: Config.bar_spacing_fun(batteryButton.height)
Text {
id: batteryPercentageSymbol
@@ -121,7 +121,7 @@ MouseArea {
id: batteryPopup
anchorItem: batteryButton
anchorHovered: batteryButton.containsMouse
spacingValue: Config.spacing_fun(batteryButton.height)
spacingValue: Config.bar_spacing_fun(batteryButton.height)
radiusValue: Config.radius_fun(batteryButton.height)
Column {