Bug 476977

Summary: Padding issues when "Show seconds" is set to "Always" and "Show date" is set to "Always beside time"
Product: [Plasma] plasmashell Reporter: Bacteria <dev.bacteriostat>
Component: Digital Clock widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: dev.bacteriostat, nate
Priority: NOR Keywords: qt6
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: digital-clock in horizontal panel

Description Bacteria 2023-11-14 07:19:24 UTC
SUMMARY
Digital Clock has no padding between date and time when "Show seconds" is set to "Always" and "Show date" is set to "Always beside time" 

STEPS TO REPRODUCE
1. Set "Show seconds" to "Always"
2. Set Show date" to "Always beside time" 

OBSERVED RESULT
1. No padding between date and time
2. No padding after time

EXPECTED RESULT
1. Padding between date and time
2. Padding after time

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: git master
KDE Frameworks Version: git master
Qt Version: 6.6.0
Comment 1 Bacteria 2023-11-14 07:35:45 UTC
Created attachment 163140 [details]
digital-clock in horizontal panel
Comment 2 Bug Janitor Service 2023-11-14 10:24:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3533
Comment 3 Nate Graham 2023-11-14 16:17:30 UTC
Git commit 0d681babf27a7026914941cf15642a619ad70f73 by Nate Graham, on behalf of Bacteria Dev.
Committed on 14/11/2023 at 17:17.
Pushed by ngraham into branch 'master'.

applets/digital-clock: Fix padding for digital clock in oneLineDate state

The width taken by `timeLabel` is set to `sizehelper.contentWidth` which
does not reflect the real width of `timeLabel`. Setting it instead to
`timeLabel.paintedWidth` provides the actual rendered width of `timeLabel`.

`Grid` QML type already has the `columnSpacing` property set so we don't
need to manually add any spacing to the individual items.

M  +2    -2    applets/digital-clock/package/contents/ui/DigitalClock.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/0d681babf27a7026914941cf15642a619ad70f73