1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 06:52:50 -05:00

dankbar: remove hardcoded font weights

fixes #539
This commit is contained in:
bbedward
2025-10-23 23:11:20 -04:00
parent ab4e9646ad
commit 0f55bbc148
13 changed files with 0 additions and 47 deletions

View File

@@ -50,7 +50,6 @@ BasePill {
StyledText { StyledText {
text: BatteryService.batteryLevel.toString() text: BatteryService.batteryLevel.toString()
font.pixelSize: Theme.barTextSize(battery.barThickness) font.pixelSize: Theme.barTextSize(battery.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
visible: BatteryService.batteryAvailable visible: BatteryService.batteryAvailable
@@ -87,7 +86,6 @@ BasePill {
StyledText { StyledText {
text: `${BatteryService.batteryLevel}%` text: `${BatteryService.batteryLevel}%`
font.pixelSize: Theme.barTextSize(battery.barThickness) font.pixelSize: Theme.barTextSize(battery.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: BatteryService.batteryAvailable visible: BatteryService.batteryAvailable

View File

@@ -37,7 +37,6 @@ BasePill {
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
color: Theme.surfaceText color: Theme.surfaceText
font.weight: Font.Normal
width: 9 width: 9
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
@@ -54,7 +53,6 @@ BasePill {
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
color: Theme.surfaceText color: Theme.surfaceText
font.weight: Font.Normal
width: 9 width: 9
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
@@ -68,7 +66,6 @@ BasePill {
text: String(systemClock?.date?.getMinutes()).padStart(2, '0').charAt(0) text: String(systemClock?.date?.getMinutes()).padStart(2, '0').charAt(0)
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
color: Theme.surfaceText color: Theme.surfaceText
font.weight: Font.Normal
width: 9 width: 9
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
@@ -77,7 +74,6 @@ BasePill {
text: String(systemClock?.date?.getMinutes()).padStart(2, '0').charAt(1) text: String(systemClock?.date?.getMinutes()).padStart(2, '0').charAt(1)
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
color: Theme.surfaceText color: Theme.surfaceText
font.weight: Font.Normal
width: 9 width: 9
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
@@ -92,7 +88,6 @@ BasePill {
text: String(systemClock?.date?.getSeconds()).padStart(2, '0').charAt(0) text: String(systemClock?.date?.getSeconds()).padStart(2, '0').charAt(0)
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
color: Theme.surfaceText color: Theme.surfaceText
font.weight: Font.Normal
width: 9 width: 9
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
@@ -101,7 +96,6 @@ BasePill {
text: String(systemClock?.date?.getSeconds()).padStart(2, '0').charAt(1) text: String(systemClock?.date?.getSeconds()).padStart(2, '0').charAt(1)
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
color: Theme.surfaceText color: Theme.surfaceText
font.weight: Font.Normal
width: 9 width: 9
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
@@ -134,7 +128,6 @@ BasePill {
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
color: Theme.primary color: Theme.primary
font.weight: Font.Light
width: 9 width: 9
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
@@ -149,7 +142,6 @@ BasePill {
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
color: Theme.primary color: Theme.primary
font.weight: Font.Light
width: 9 width: 9
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
@@ -169,7 +161,6 @@ BasePill {
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
color: Theme.primary color: Theme.primary
font.weight: Font.Light
width: 9 width: 9
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
@@ -184,7 +175,6 @@ BasePill {
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
color: Theme.primary color: Theme.primary
font.weight: Font.Light
width: 9 width: 9
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }

View File

@@ -59,7 +59,6 @@ BasePill {
return DgopService.cpuUsage.toFixed(0); return DgopService.cpuUsage.toFixed(0);
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
@@ -97,7 +96,6 @@ BasePill {
return DgopService.cpuUsage.toFixed(0) + "%"; return DgopService.cpuUsage.toFixed(0) + "%";
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
@@ -106,7 +104,6 @@ BasePill {
StyledTextMetrics { StyledTextMetrics {
id: cpuBaseline id: cpuBaseline
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
text: "100%" text: "100%"
} }

View File

@@ -59,7 +59,6 @@ BasePill {
return Math.round(DgopService.cpuTemperature).toString(); return Math.round(DgopService.cpuTemperature).toString();
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
@@ -97,7 +96,6 @@ BasePill {
return Math.round(DgopService.cpuTemperature) + "°"; return Math.round(DgopService.cpuTemperature) + "°";
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
@@ -106,7 +104,6 @@ BasePill {
StyledTextMetrics { StyledTextMetrics {
id: tempBaseline id: tempBaseline
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
text: "100°" text: "100°"
} }

View File

@@ -114,7 +114,6 @@ BasePill {
return root.diskUsagePercent.toFixed(0) return root.diskUsagePercent.toFixed(0)
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
@@ -149,7 +148,6 @@ BasePill {
return root.selectedMount.mount return root.selectedMount.mount
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
@@ -164,7 +162,6 @@ BasePill {
return root.diskUsagePercent.toFixed(0) + "%" return root.diskUsagePercent.toFixed(0) + "%"
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
@@ -173,7 +170,6 @@ BasePill {
StyledTextMetrics { StyledTextMetrics {
id: diskBaseline id: diskBaseline
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
text: "100%" text: "100%"
} }

View File

@@ -146,7 +146,6 @@ BasePill {
} }
font.pixelSize: 10 font.pixelSize: 10
color: Theme.surfaceText color: Theme.surfaceText
font.weight: Font.Medium
} }
Row { Row {
@@ -166,7 +165,6 @@ BasePill {
return desktopEntry && desktopEntry.name ? desktopEntry.name : activeWindow.appId; return desktopEntry && desktopEntry.name ? desktopEntry.name : activeWindow.appId;
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
elide: Text.ElideRight elide: Text.ElideRight
@@ -203,7 +201,6 @@ BasePill {
return title; return title;
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
elide: Text.ElideRight elide: Text.ElideRight

View File

@@ -123,7 +123,6 @@ BasePill {
return Math.round(root.displayTemp).toString(); return Math.round(root.displayTemp).toString();
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
@@ -161,7 +160,6 @@ BasePill {
return Math.round(root.displayTemp) + "°"; return Math.round(root.displayTemp) + "°";
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
@@ -170,7 +168,6 @@ BasePill {
StyledTextMetrics { StyledTextMetrics {
id: gpuTempBaseline id: gpuTempBaseline
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
text: "100°" text: "100°"
} }

View File

@@ -42,7 +42,6 @@ BasePill {
return root.currentLayout.substring(0, 2).toUpperCase() return root.currentLayout.substring(0, 2).toUpperCase()
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }

View File

@@ -176,7 +176,6 @@ BasePill {
text: textContainer.displayText text: textContainer.displayText
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
color: Theme.surfaceText color: Theme.surfaceText
font.weight: Font.Medium
wrapMode: Text.NoWrap wrapMode: Text.NoWrap
x: needsScrolling ? -scrollOffset : 0 x: needsScrolling ? -scrollOffset : 0
onTextChanged: { onTextChanged: {

View File

@@ -54,7 +54,6 @@ BasePill {
return (rate / (1024 * 1024)).toFixed(0) + "M" return (rate / (1024 * 1024)).toFixed(0) + "M"
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.info color: Theme.info
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
@@ -67,7 +66,6 @@ BasePill {
return (rate / (1024 * 1024)).toFixed(0) + "M" return (rate / (1024 * 1024)).toFixed(0) + "M"
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.error color: Theme.error
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
@@ -99,7 +97,6 @@ BasePill {
StyledText { StyledText {
text: DgopService.networkRxRate > 0 ? root.formatNetworkSpeed(DgopService.networkRxRate) : "0 B/s" text: DgopService.networkRxRate > 0 ? root.formatNetworkSpeed(DgopService.networkRxRate) : "0 B/s"
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
@@ -109,7 +106,6 @@ BasePill {
StyledTextMetrics { StyledTextMetrics {
id: rxBaseline id: rxBaseline
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
text: "88.8 MB/s" text: "88.8 MB/s"
} }
@@ -137,7 +133,6 @@ BasePill {
StyledText { StyledText {
text: DgopService.networkTxRate > 0 ? root.formatNetworkSpeed(DgopService.networkTxRate) : "0 B/s" text: DgopService.networkTxRate > 0 ? root.formatNetworkSpeed(DgopService.networkTxRate) : "0 B/s"
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
@@ -147,7 +142,6 @@ BasePill {
StyledTextMetrics { StyledTextMetrics {
id: txBaseline id: txBaseline
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
text: "88.8 MB/s" text: "88.8 MB/s"
} }

View File

@@ -59,7 +59,6 @@ BasePill {
return DgopService.memoryUsage.toFixed(0); return DgopService.memoryUsage.toFixed(0);
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
@@ -97,7 +96,6 @@ BasePill {
return DgopService.memoryUsage.toFixed(0) + "%"; return DgopService.memoryUsage.toFixed(0) + "%";
} }
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
@@ -106,7 +104,6 @@ BasePill {
StyledTextMetrics { StyledTextMetrics {
id: ramBaseline id: ramBaseline
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
text: "100%" text: "100%"
} }

View File

@@ -332,7 +332,6 @@ Item {
} }
font.pixelSize: 10 font.pixelSize: 10
color: Theme.surfaceText color: Theme.surfaceText
font.weight: Font.Medium
} }
Rectangle { Rectangle {
@@ -352,7 +351,6 @@ Item {
text: windowCount > 9 ? "9+" : windowCount text: windowCount > 9 ? "9+" : windowCount
font.pixelSize: 9 font.pixelSize: 9
color: Theme.surface color: Theme.surface
font.weight: Font.Bold
} }
} }
@@ -367,7 +365,6 @@ Item {
text: windowTitle text: windowTitle
font.pixelSize: Theme.barTextSize(barThickness) font.pixelSize: Theme.barTextSize(barThickness)
color: Theme.surfaceText color: Theme.surfaceText
font.weight: Font.Medium
elide: Text.ElideRight elide: Text.ElideRight
maximumLineCount: 1 maximumLineCount: 1
} }
@@ -559,7 +556,6 @@ Item {
} }
font.pixelSize: 10 font.pixelSize: 10
color: Theme.surfaceText color: Theme.surfaceText
font.weight: Font.Medium
} }
Rectangle { Rectangle {
@@ -579,7 +575,6 @@ Item {
text: windowCount > 9 ? "9+" : windowCount text: windowCount > 9 ? "9+" : windowCount
font.pixelSize: 9 font.pixelSize: 9
color: Theme.surface color: Theme.surface
font.weight: Font.Bold
} }
} }
@@ -593,7 +588,6 @@ Item {
text: windowTitle text: windowTitle
font.pixelSize: Theme.barTextSize(barThickness) font.pixelSize: Theme.barTextSize(barThickness)
color: Theme.surfaceText color: Theme.surfaceText
font.weight: Font.Medium
elide: Text.ElideRight elide: Text.ElideRight
maximumLineCount: 1 maximumLineCount: 1
} }
@@ -780,7 +774,6 @@ Item {
text: I18n.tr("Close") text: I18n.tr("Close")
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceText color: Theme.surfaceText
font.weight: Font.Normal
} }
MouseArea { MouseArea {

View File

@@ -112,7 +112,6 @@ BasePill {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: SystemUpdateService.updateCount.toString() text: SystemUpdateService.updateCount.toString()
font.pixelSize: Theme.barTextSize(root.barThickness) font.pixelSize: Theme.barTextSize(root.barThickness)
font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
visible: root.hasUpdates && !root.isChecking visible: root.hasUpdates && !root.isChecking
} }