[Calculator] Make buttons' text labels scale in size along with the widget

Authored by ngraham on May 30 2019, 4:56 PM.



The Calculator widget's button labels were not scaling in size as the widget got bigger,
leading to situations where the labels were tiny when the widget was very large.

This patch addresses that situation by scaling the labels size along with the widget.

For best results, also apply D21502.

Thanks to @broulik for the implementation idea!

Test Plan

Diff Detail

R114 Plasma Addons
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.May 30 2019, 4:56 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 30 2019, 4:56 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.May 30 2019, 4:56 PM
broulik accepted this revision.Jun 3 2019, 4:05 PM

That 12 is a bit random, isn't it? But glad my approach just works™

This revision is now accepted and ready to land.Jun 3 2019, 4:05 PM
davidedmundson added inline comments.

This will change with the font size, surely breaking it?

ngraham added inline comments.Jun 4 2019, 1:19 PM

I didn't see any regressions in testing...

Following the code will find more bugs than testing.

Once you resize down the layout minimumSize (and switchSize) changes and you won't switch.

old code would iconify before this point.

Ah, will fix.