Repository navigation
fix: let Candy and Corners show date and time in the system locale - #4
Conversation
Both themes hardcoded an English 12h format in theme.conf, so a 24h locale still showed "05:05 PM". Leave the formats blank in theme.conf. Candy's Clock.qml already falls back to Locale.ShortFormat/LongFormat for a blank value. Corners passed the format straight to toLocaleTimeString and toLocaleDateString, where a blank string renders nothing, so DateTimePanel.qml now falls back to the same locale formats.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
No need to bootstrap with scripts right? |
|
Right, no scripts needed. The fix is in the theme files themselves: blank |
Will remove the blob in the main HyDE repo. And point deez dots to this repo. |
Candy and Corners hardcode an English 12h time and date format in
theme.conf, so a 24h locale still shows05:05 PMon the login screen. Suggested in HyDE-Project/HyDE#2168.theme.conf: the formats are blank now (HourFormat/DateFormatin Candy,TimeFormat/DateFormatin Corners).Components/Clock.qmlalready falls back toLocale.ShortFormat/LongFormatfor a blank value.DateTimePanel.qmlpassed the format straight totoLocaleTimeString/toLocaleDateString, and Qt renders a blank format as an empty string. It now falls back toLocale.ShortFormat/LongFormatwhen the format is blank or missing, so a user config that still sets a format keeps working.Checked the fallback expression in Qt 6 under
de_DE(17:05,Samstag, 3. Oktober 2026) anden_US(5:05 PM) for a blank, a missing and a set format. The release workflow rebuilds the archives on push tomaster; HyDE bundles its own copies inSource/arcs/, which I'm refreshing in a follow-up HyDE PR.Verified in the real greeter
Rendered with
sddm-greeter --test-mode --theme <dir>(SDDM 0.21, Qt5 greeter) underLC_ALL=de_DE.UTF-8anden_US.UTF-8, old archive vs. this one, at 13:06:01:06 PM,Samstag, Oktober 313:06,Samstag, 3. Oktober 202601:06 PM,Saturday, October 31:06 PM,Saturday, October 3, 202601:06 PM,Samstag, 3 of Oktober13:06,Samstag, 3. Oktober 202601:06 PM,Saturday, 3 of October1:06 PM,Saturday, October 3, 2026So a German locale no longer gets a 12h clock with an English
ofin the date, and an English one gets the locale's own format. Corners keeps showing a clock with blank formats because of the QML fallback.