use tabular numbers for sidebar timers

This commit is contained in:
end-4
2026-03-24 17:22:44 +01:00
parent ef38057830
commit 698692a500
2 changed files with 4 additions and 1 deletions
@@ -40,6 +40,7 @@ Item {
return `${minutes}:${seconds}`;
}
font.pixelSize: 40
font.features: { "tnum": 1 }
color: Appearance.m3colors.m3onSurface
}
StyledText {
@@ -53,6 +53,7 @@ Item {
StyledText {
// Layout.preferredWidth: elapsedIndicator.width * 0.6 // Prevent shakiness
font.pixelSize: 40
font.features: { "tnum": 1 }
color: Appearance.m3colors.m3onSurface
text: {
let totalSeconds = Math.floor(TimerService.stopwatchTime) / 100
@@ -64,9 +65,10 @@ Item {
StyledText {
Layout.fillWidth: true
font.pixelSize: 40
font.features: { "tnum": 1 }
color: Appearance.colors.colSubtext
text: {
return `:<sub>${(Math.floor(TimerService.stopwatchTime) % 100).toString().padStart(2, '0')}</sub>`
return `:${(Math.floor(TimerService.stopwatchTime) % 100).toString().padStart(2, '0')}`
}
}
}