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}`; return `${minutes}:${seconds}`;
} }
font.pixelSize: 40 font.pixelSize: 40
font.features: { "tnum": 1 }
color: Appearance.m3colors.m3onSurface color: Appearance.m3colors.m3onSurface
} }
StyledText { StyledText {
@@ -53,6 +53,7 @@ Item {
StyledText { StyledText {
// Layout.preferredWidth: elapsedIndicator.width * 0.6 // Prevent shakiness // Layout.preferredWidth: elapsedIndicator.width * 0.6 // Prevent shakiness
font.pixelSize: 40 font.pixelSize: 40
font.features: { "tnum": 1 }
color: Appearance.m3colors.m3onSurface color: Appearance.m3colors.m3onSurface
text: { text: {
let totalSeconds = Math.floor(TimerService.stopwatchTime) / 100 let totalSeconds = Math.floor(TimerService.stopwatchTime) / 100
@@ -64,9 +65,10 @@ Item {
StyledText { StyledText {
Layout.fillWidth: true Layout.fillWidth: true
font.pixelSize: 40 font.pixelSize: 40
font.features: { "tnum": 1 }
color: Appearance.colors.colSubtext color: Appearance.colors.colSubtext
text: { text: {
return `:<sub>${(Math.floor(TimerService.stopwatchTime) % 100).toString().padStart(2, '0')}</sub>` return `:${(Math.floor(TimerService.stopwatchTime) % 100).toString().padStart(2, '0')}`
} }
} }
} }