Fix date-label size in vertical layout
Needs RevisionPublic

Authored by carewolf on Feb 20 2020, 3:37 PM.

Details

Reviewers
ndavis
ngraham
Group Reviewers
VDG
Summary

The text was smaller than than minimum configuration, and
also smaller than the width allowed for.

Diff Detail

Repository
R120 Plasma Workspace
Branch
Plasma/5.18
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22748
Build 22766: arc lint + arc unit
carewolf created this revision.Feb 20 2020, 3:37 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 20 2020, 3:37 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
carewolf requested review of this revision.Feb 20 2020, 3:37 PM
carewolf updated this revision to Diff 76055.Feb 20 2020, 3:39 PM

Fix the logic to what was probably originally meant.

Elided is still disabled as it triggers too aggresively on narrow fits.

carewolf added a reviewer: ngraham.

Does this work well with vertical panels?

ndavis added a reviewer: VDG.Feb 20 2020, 3:46 PM

It only affects vertical panels, it is in the vertical panel configuration.

Thanks for the patch! Looks like this doesn't fully fix the issue though. With "Short Date" I see the following:

In my case the text was too small.

I wonder how exactly Text.Fit works, if it just increases font-size for short format to fill width that could make it too big.

Well your patch doesn't regress anything for me, so if it fixes it for you, that's good.

Still it might be good to have some clarity here so we understand what's going on! :p

carewolf updated this revision to Diff 76092.Feb 21 2020, 11:30 AM

Fixing also for short data and very long dates

ngraham requested changes to this revision.Feb 21 2020, 2:19 PM

Now using the "Long Date" setting in a double-width panel results in the following:

And "Short Date" looks like this:

font.pixelSize: timeLabel.height * 0.4 doesn't look right to me.

This revision now requires changes to proceed.Feb 21 2020, 2:19 PM