From 1c30b8373343bc4db58148938b7dea0c012f94f8 Mon Sep 17 00:00:00 2001 From: Saman Shirdel Date: Thu, 23 Jul 2026 02:01:39 +0330 Subject: [PATCH] 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) --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: David Heinemeier Hansson Co-authored-by: Claude Opus 4.8 (1M context) --- shell/plugins/bar/widgets/Clock.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/shell/plugins/bar/widgets/Clock.qml b/shell/plugins/bar/widgets/Clock.qml index fdcb8793..6524cc1b 100644 --- a/shell/plugins/bar/widgets/Clock.qml +++ b/shell/plugins/bar/widgets/Clock.qml @@ -12,8 +12,8 @@ BarWidget { property date displayDate: clock.date readonly property string activeFormat: alt - ? setting("formatAlt", "d MMMM 'W'ww yyyy") - : (bar && bar.vertical ? setting("verticalFormat", "HH\n—\nmm") : setting("format", "dddd HH:mm")) + ? (vertical ? setting("verticalFormatAlt", "dd\nMMM\n'W'ww\nyyyy") : setting("formatAlt", "d MMMM 'W'ww yyyy")) + : (vertical ? setting("verticalFormat", "HH\n—\nmm") : setting("format", "dddd HH:mm")) readonly property string displayText: formatted(displayDate) readonly property var verticalLines: displayText.split("\n") @@ -81,7 +81,9 @@ BarWidget { height: Style.bar.iconSlot text: modelData fontFamily: button.fontFamily - fontSize: button.fontSize + fontSize: modelData.length > 3 + ? button.fontSize * 0.9 + : button.fontSize color: button.foreground } }