Make PC3 ToolButton use SmallMedium icon size by default, to match other versions

Authored by ngraham on Feb 7 2020, 6:18 PM.


Group Reviewers

PC3 ToolButtons do not have the same size as PC2 and QWidgets ToolButtons. This patch
fixes that.

Test Plan

Now PC3 ToolButtons have the same size as PC2 and QWidgets ones by default if you don't
override the icon.height and icon.width properties.

Diff Detail

R242 Plasma Framework (Library)
fix-pc3-toolbutton-sizing (branched from master)
No Linters Available
No Unit Test Coverage
Build Status
Buildable 22205
Build 22223: arc lint + arc unit
ngraham created this revision.Feb 7 2020, 6:18 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 7 2020, 6:18 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
ngraham requested review of this revision.Feb 7 2020, 6:18 PM
gvgeo added a subscriber: gvgeo.Feb 7 2020, 7:29 PM
gvgeo added inline comments.

Now will always be > 0, right?

ndavis accepted this revision.Feb 7 2020, 11:09 PM
This revision is now accepted and ready to land.Feb 7 2020, 11:09 PM
ngraham updated this revision to Diff 75208.Feb 8 2020, 5:02 AM
ngraham marked an inline comment as done.

Good catch; only set icon height and width if an icon has actually been provided

gvgeo added a comment.Feb 8 2020, 2:42 PM

On second thought, maybe it was fine. Layout.preferredWidth should not have any effect when icon is not visible anyway. And negative value could be set if needed.

gvgeo added a comment.Feb 9 2020, 1:41 PM

It could be my broken build. But this is what I see with X11 and scale 1.75.

ngraham abandoned this revision.Feb 14 2020, 1:35 PM
ngraham added a subscriber: mart.

Looks like @mart just did this in D27396.