fix(clock): display date, week, and year vertically in vertical bar. (#6336)
* fix(clock): display date, week, and year vertically in vertical * fix vertical date alignment in panel * Update Clock.qml * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Address review feedback on Clock vertical format Use the BarWidget-provided `vertical` property instead of repeating the `bar && bar.vertical` ternary, and clean up stray tab/trailing whitespace. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: David Heinemeier Hansson <david@hey.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
Copilot Autofix powered by AI
David Heinemeier Hansson
parent
3481b5614b
commit
1c30b83733
@@ -12,8 +12,8 @@ BarWidget {
|
|||||||
property date displayDate: clock.date
|
property date displayDate: clock.date
|
||||||
|
|
||||||
readonly property string activeFormat: alt
|
readonly property string activeFormat: alt
|
||||||
? setting("formatAlt", "d MMMM 'W'ww yyyy")
|
? (vertical ? setting("verticalFormatAlt", "dd\nMMM\n'W'ww\nyyyy") : setting("formatAlt", "d MMMM 'W'ww yyyy"))
|
||||||
: (bar && bar.vertical ? setting("verticalFormat", "HH\n—\nmm") : setting("format", "dddd HH:mm"))
|
: (vertical ? setting("verticalFormat", "HH\n—\nmm") : setting("format", "dddd HH:mm"))
|
||||||
readonly property string displayText: formatted(displayDate)
|
readonly property string displayText: formatted(displayDate)
|
||||||
readonly property var verticalLines: displayText.split("\n")
|
readonly property var verticalLines: displayText.split("\n")
|
||||||
|
|
||||||
@@ -81,7 +81,9 @@ BarWidget {
|
|||||||
height: Style.bar.iconSlot
|
height: Style.bar.iconSlot
|
||||||
text: modelData
|
text: modelData
|
||||||
fontFamily: button.fontFamily
|
fontFamily: button.fontFamily
|
||||||
fontSize: button.fontSize
|
fontSize: modelData.length > 3
|
||||||
|
? button.fontSize * 0.9
|
||||||
|
: button.fontSize
|
||||||
color: button.foreground
|
color: button.foreground
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user