[applets/digital-clock] Fix date sizing in vertical panel
ClosedPublic

Authored by ngraham on Mar 20 2020, 10:44 PM.

Details

Summary

This patch fixes several errors in the code:

  • The property is named font.minimumPixelSize, not minimumPixelSize
  • The calculation in minimumPixelSize did not make sense
  • Setting the height to dateLabel.paintedHeight is nonsensical

BUG: 417852
FIXED-IN: 5.18.4

Test Plan

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.Mar 20 2020, 10:44 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 20 2020, 10:44 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Mar 20 2020, 10:44 PM
muesli added a subscriber: muesli.Mar 21 2020, 1:10 PM

Your patch indeed makes the date behave like in previous releases again! However I noticed it's still not quite consistent in its behavior: when I start plasmashell freshly, the date is a lot wider than after resizing it to roughly the same width. I've added a new attachment, which hopefully explains what I'm trying to say.

Yeah, I've noticed that too. I haven't been able to figure out how to improve it. Where it decides to wrap is also not very deterministic.

While it's not completely consistent yet, it still's an improvement that reverts the recent regression. As such, I'm tempted to say LGTM.

cblack accepted this revision as: VDG, cblack.Mar 23 2020, 8:40 PM
cblack added a subscriber: cblack.

Visually looks nice, but would wait on review from a more experienced Plasma person since this looks like it could potentially be problematic and indeterministic at a glance to me.

This revision is now accepted and ready to land.Mar 23 2020, 8:40 PM
davidedmundson accepted this revision.Mar 24 2020, 3:16 PM
davidedmundson added a subscriber: davidedmundson.

You probably still want the elide.

We have a word wrap on, so you'll only hit this elide option when the alternative is paint outside the area and just leak over other items in the system tray. That always looks rubbish.

ngraham updated this revision to Diff 78366.Mar 24 2020, 3:25 PM

Restore elision property

This revision was automatically updated to reflect the committed changes.