1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

Implement sizing mechanism for bar widget content

This commit is contained in:
bbedward
2025-10-06 20:40:02 -04:00
parent 7158e09b0e
commit ef9f76190d
27 changed files with 149 additions and 93 deletions

View File

@@ -40,7 +40,7 @@ Rectangle {
DankIcon {
name: BatteryService.getBatteryIcon()
size: Theme.iconSize - 8
size: Theme.barIconSize(barThickness)
color: {
if (!BatteryService.batteryAvailable) {
return Theme.surfaceText
@@ -61,7 +61,7 @@ Rectangle {
StyledText {
text: BatteryService.batteryLevel.toString()
font.pixelSize: Theme.fontSizeSmall
font.pixelSize: Theme.barTextSize(barThickness)
font.weight: Font.Medium
color: Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter
@@ -77,7 +77,7 @@ Rectangle {
DankIcon {
name: BatteryService.getBatteryIcon()
size: Theme.iconSize - 6
size: Theme.barIconSize(barThickness, -4)
color: {
if (!BatteryService.batteryAvailable) {
return Theme.surfaceText;
@@ -98,7 +98,7 @@ Rectangle {
StyledText {
text: `${BatteryService.batteryLevel}%`
font.pixelSize: Theme.fontSizeSmall
font.pixelSize: Theme.barTextSize(barThickness)
font.weight: Font.Medium
color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter