mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-25 05:52:50 -05:00
Fixed an issue where the UI width was shifted due to the clock widget when using non-monospaced fonts. (#1491)
This commit is contained in:
@@ -211,6 +211,20 @@ BasePill {
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.baseline: dateText.baseline
|
||||
width: timeTextMetrics.width
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
TextMetrics {
|
||||
id: timeTextMetrics
|
||||
font: timeText.font
|
||||
text: {
|
||||
const format = SettingsData.getEffectiveTimeFormat();
|
||||
if (SettingsData.use24HourClock) {
|
||||
return SettingsData.showSeconds ? "88:88:88" : "88:88";
|
||||
} else {
|
||||
return SettingsData.showSeconds ? "88:88:88 PM" : "88:88 PM";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
||||
Reference in New Issue
Block a user