forked from Shinonome/dots-hyprland
use tabular numbers for sidebar timers
This commit is contained in:
@@ -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')}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user