Bug 434598

Summary: Clock not vertically centered when using a time format without a leading zero for hours
Product: [Plasma] plasmashell Reporter: medin <med.medin.2014>
Component: Digital Clock widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.21.2   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Time format
Bad alignement

Description medin 2021-03-18 23:26:10 UTC
Created attachment 136829 [details]
Time format

When time has one hour digit, it's not centered with date and it has slight bigger gap with timezone. See attached image for more info.

Operating System: Manjaro Linux
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.4.101-1-MANJARO
OS Type: 64-bit
Comment 1 Nate Graham 2021-03-19 13:29:59 UTC
This is intentional. If we used only the available space, then when the hour changes to one with two digits, the whole clock would become wider, pushing all of your widgets to the left of it over by a few pixels, and then you (or someone else) would file a bug report about that. :)
Comment 2 medin 2021-03-19 14:40:20 UTC
(In reply to Nate Graham from comment #1)
> This is intentional. If we used only the available space, then when the hour
> changes to one with two digits, the whole clock would become wider, pushing
> all of your widgets to the left of it over by a few pixels, and then you (or
> someone else) would file a bug report about that. :)

I didn't mean to make clock text width smaller when hour is one digit, but the whole clock text becomes not centered with date, see attached image for more info.
Comment 3 medin 2021-03-19 14:40:58 UTC
Created attachment 136847 [details]
Bad alignement
Comment 4 Nate Graham 2021-03-19 17:24:23 UTC
Oh I see, that makes more sense, thanks. Can confirm.