Bug 476925

Summary: Digital clock in vertical panels has too much padding on top and bottom when not showing the date and/or timezone
Product: [Plasma] plasmashell Reporter: Jin Liu <ad.liu.jin>
Component: Digital ClockAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: dev.bacteriostat, nate
Priority: NOR Keywords: qt6
Version: 5.27.80   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 6.0
Sentry Crash Report:
Attachments: screenshot

Description Jin Liu 2023-11-13 08:03:55 UTC
Created attachment 163108 [details]
screenshot

SUMMARY
Screenshot attached.

Looks like it's not a fixed padding, but grows as the panel is wider. Perhaps the applet is always square.

I compared the code
https://github.com/KDE/plasma-workspace/blob/master/applets/digital-clock/package/contents/ui/DigitalClock.qml
against 5.27. Found no changes related to padding or height. Perhaps something in the framework code?

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Kernel Version: 6.6.1-arch1-1 (64-bit)
Graphics Platform: offscreen
Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics
Memory: 13.5 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 1 Nate Graham 2023-11-15 19:17:22 UTC
Can reproduce when the date and timezone are hidden; the applet doesn't vertically condense as needed. I didn't notice this before because I always have the date and timezone visible.
Comment 2 Nate Graham 2023-12-18 22:00:18 UTC
Git commit 0d14b0b153ef2bdbe1e097edb7415f3e3cef21bc by Nate Graham, on behalf of Niccolò Venerandi.
Committed on 18/12/2023 at 23:00.
Pushed by ngraham into branch 'master'.

Simplify code for applet sizes and respect max width/height of non-filling applets

Some applets don't fillWidth/Height, and yet they still set a MaxWidth/MaxHeight
(and, usually, a minWidth/minHeight that's the same value). This respects the
requested size, and tries to simplify the code using `||` as a fallback operator
instead of nested `? :` operators.
Related: bug 477813

M  +2    -2    applets/kickoff/package/contents/ui/main.qml
M  +23   -46   containments/panel/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/0d14b0b153ef2bdbe1e097edb7415f3e3cef21bc