Skip to content

fix: let Candy and Corners show date and time in the system locale - #4

Merged
kRHYME7 merged 1 commit into
HyDE-Project:masterfrom
Delcado19:fix/sddm-theme-locale
Oct 3, 2026
Merged

kRHYME7 merged 1 commit into
HyDE-Project:masterfrom
Delcado19:fix/sddm-theme-locale

Conversation

@Delcado19

@Delcado19 Delcado19 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Candy and Corners hardcode an English 12h time and date format in theme.conf, so a 24h locale still shows 05:05 PM on the login screen. Suggested in HyDE-Project/HyDE#2168.

  • theme.conf: the formats are blank now (HourFormat/DateFormat in Candy, TimeFormat/DateFormat in Corners).
  • Candy: nothing else to change, Components/Clock.qml already falls back to Locale.ShortFormat/LongFormat for a blank value.
  • Corners: DateTimePanel.qml passed the format straight to toLocaleTimeString/toLocaleDateString, and Qt renders a blank format as an empty string. It now falls back to Locale.ShortFormat/LongFormat when 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) and en_US (5:05 PM) for a blank, a missing and a set format. The release workflow rebuilds the archives on push to master; HyDE bundles its own copies in Source/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) under LC_ALL=de_DE.UTF-8 and en_US.UTF-8, old archive vs. this one, at 13:06:

Theme Locale Before After
Corners de_DE 01:06 PM, Samstag, Oktober 3 13:06, Samstag, 3. Oktober 2026
Corners en_US 01:06 PM, Saturday, October 3 1:06 PM, Saturday, October 3, 2026
Candy de_DE 01:06 PM, Samstag, 3 of Oktober 13:06, Samstag, 3. Oktober 2026
Candy en_US 01:06 PM, Saturday, 3 of October 1:06 PM, Saturday, October 3, 2026

So a German locale no longer gets a 12h clock with an English of in 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.

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.
@coderabbitai

coderabbitai Bot commented Oct 3, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bf5c15ae-0a63-4b0c-8881-36b11d0b4a2d
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kRHYME7

kRHYME7 commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

No need to bootstrap with scripts right?

@kRHYME7
kRHYME7 merged commit 4f13e78 into HyDE-Project:master Oct 3, 2026
1 check passed
@Delcado19

Copy link
Copy Markdown
Contributor Author

Right, no scripts needed. The fix is in the theme files themselves: blank HourFormat/DateFormat in Candy and TimeFormat/DateFormat in Corners, plus a locale fallback in Corners' DateTimePanel.qml, since a blank format renders as an empty string there. The release workflow just rebuilt the archives from master (I checked the latest tarballs: the formats are blank and there are no scripts in them), and HyDE refreshed its bundled copies in #2169. The only catch is that an existing install keeps its old theme.conf until the theme is extracted again.

@kRHYME7

kRHYME7 commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

The release workflow rebuilds the archives on push to master; HyDE bundles its own copies in Source/arcs/, which I'm refreshing in a follow-up HyDE PR.

Will remove the blob in the main HyDE repo. And point deez dots to this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants