make button icons follow a reasonable size and layout
Needs ReviewPublic

Authored by camiloh on Aug 22 2019, 3:40 PM.

Details

Summary

with the Plasma style buttons which have an icon look wrong. The icon size is too big and in consecuence the whole button is drawn way too big.
With this patch the icon is set to a standard size and drawn in the button layout, in a way it looks consistent with other button with no icons.

example:

Before path:

With patch:

BUG: 399952
FIXED-IN: 5.62

Diff Detail

Repository
R242 Plasma Framework (Library)
Branch
arcpatch-D23352_2
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15749
Build 15767: arc lint + arc unit
camiloh created this revision.Aug 22 2019, 3:40 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 22 2019, 3:40 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
camiloh requested review of this revision.Aug 22 2019, 3:40 PM
camiloh updated this revision to Diff 64317.Aug 22 2019, 3:41 PM

correct import line

camiloh edited the summary of this revision. (Show Details)Aug 22 2019, 3:43 PM
camiloh edited the summary of this revision. (Show Details)
ngraham edited the summary of this revision. (Show Details)Aug 22 2019, 4:34 PM
ngraham accepted this revision.Aug 22 2019, 4:38 PM
ngraham added a subscriber: ngraham.

LGTM, just fix the whitespace issue

src/declarativeimports/plasmacomponents3/Button.qml
68

unnecessary whitespace change

This revision is now accepted and ready to land.Aug 22 2019, 4:38 PM
camiloh updated this revision to Diff 64365.Aug 22 2019, 10:24 PM

remove white line

camiloh marked an inline comment as done.Aug 22 2019, 10:24 PM
This revision was automatically updated to reflect the committed changes.
mart reopened this revision.Aug 28 2019, 8:41 AM

Same problem as the toolbutton one, button icons need to scale unless icon size fixed from client side

This revision is now accepted and ready to land.Aug 28 2019, 8:41 AM
mart requested changes to this revision.Aug 28 2019, 8:42 AM
This revision now requires changes to proceed.Aug 28 2019, 8:42 AM
mart added inline comments.Aug 28 2019, 9:02 AM
src/declarativeimports/plasmacomponents3/Button.qml
51

no anchors and no enclosing Item.

This was ok as it was, including fillwidth/fillheight (perhaps)
but with the line:
Layout.preferredWidth: control.icon.width > 0 ? control.icon.width : -1
same for preferredHeight

This revision was not accepted when it landed; it landed in state Needs Revision.Aug 28 2019, 9:10 AM
This revision was automatically updated to reflect the committed changes.
mart reopened this revision.Aug 28 2019, 1:29 PM
camiloh updated this revision to Diff 64850.Aug 28 2019, 2:13 PM

suggested changes. use preferred width and height when the icon group height and width props are set

camiloh updated this revision to Diff 64851.Aug 28 2019, 2:15 PM

correct slip from toolbutton