Bug 449115

Summary: 24h clock with 9:59 is larger font than 10:00 in vertical panel
Product: [Plasma] plasmashell Reporter: Chris Holland <zrenfire>
Component: Digital Clock widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: 5.23.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Chris Holland 2022-01-25 04:19:34 UTC
https://old.reddit.com/r/kde/comments/sbuz5x/change_taskbar_clock_time_format/
https://i.imgur.com/mLoDtwa.png
https://i.imgur.com/P8inO1h.png

This can happen with en_US if the user selects 24-hour in digitalclock's config. It can also be experienced by default in the Singapore locale.

For easy testing (note this is testing floating? not vertical):

    TZ="UTC-06:00" LC_TIME="en_SG.UTF-8" plasmawindowed org.kde.plasma.digitalclock
    TZ="UTC-00:00" LC_TIME="en_SG.UTF-8" plasmawindowed org.kde.plasma.digitalclock
    TZ="UTC+06:00" LC_TIME="en_SG.UTF-8" plasmawindowed org.kde.plasma.digitalclock
    TZ="UTC+12:00" LC_TIME="en_SG.UTF-8" plasmawindowed org.kde.plasma.digitalclock

https://invent.kde.org/plasma/plasma-workspace/-/blame/master/applets/digital-clock/package/contents/ui/DigitalClock.qml#L261

Looks like the vertical panels don't have enough space for 23:59 at... 10pt * 3 = 30pt

> fontSizeMode: Text.HorizontalFit
> font.pixelSize: 3 * PlasmaCore.Theme.defaultFont.pixelSize

The TZ env var doesn't seem to work with plasmoidviewer for some reason.

    TZ="UTC+05:00" LC_TIME="en_SG.UTF-8" plasmoidviewer -a org.kde.plasma.digitalclock -l leftedge -f vertical

"12:59 PM" text needs a panel to be ~178px wide.
"23:59" text needs a panel to be ~96px wide.

A "Ubuntu Unity" vertical panel is usually around 64px wide.
A "Windows 10" vertical taskbar is 92px wide according to https://www.youtube.com/watch?v=RA_szqXEJrU.

A horizontal panel defaults to what? 36px tall? There's probably 2px of padding top/bottom.
https://invent.kde.org/plasma/plasma-desktop/-/blob/master/layout-templates/org.kde.plasma.desktop.defaultPanel/contents/layout.js#L30

32px*0.71=22.7px Time
32px*0.56=17.9px Time (w/ Date)
Comment 1 Nate Graham 2024-02-23 22:37:39 UTC
Is this not intentional? On a vertical panel. the font scales up and down to fit the horizontal space. Fewer digits means less text means more space means a larger font. Seems correct to me, no?
Comment 2 Bug Janitor Service 2024-03-09 03:46:53 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Bug Janitor Service 2024-03-24 03:46:23 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!