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

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

Details

Summary

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

Repository
R114 Plasma Addons
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.Thu, May 30, 4:56 PM
Restricted Application added a project: Plasma. · View Herald TranscriptThu, May 30, 4:56 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Thu, May 30, 4:56 PM
broulik accepted this revision.Mon, Jun 3, 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.Mon, Jun 3, 4:05 PM
davidedmundson added inline comments.
applets/calculator/package/contents/ui/calculator.qml
39

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

ngraham added inline comments.Tue, Jun 4, 1:19 PM
applets/calculator/package/contents/ui/calculator.qml
39

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.