D28606: Add iconSize to PC2 ToolButton
Noah Davis
noreply at phabricator.kde.org
Mon Apr 6 04:57:12 BST 2020
ndavis created this revision.
ndavis added a reviewer: Plasma.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
ndavis requested review of this revision.
REVISION SUMMARY
iconSize sets the size of the ToolButton's icon if it is set to a value.
If no value is set, the ToolButtonStyle IconItem's minimumWidth is bound to buttonContent.height like it was before this patch and iconSize is bound to the paintedWidth of the icon.
Usecase: In places where a custom icon size is wanted, a developer must create an IconItem nested in the ToolButton. This makes it so a developer only needs to change a single property.
TEST PLAN
1. Set iconSize for a PC2 ToolButton and see if the icon size is changed.
2. Bind the width of a component to a ToolButton's iconSize and see if it works.3. Do step 2, but don't do step 1 and see if it works
REPOSITORY
R242 Plasma Framework (Library)
BRANCH
pc2-toolbutton-iconSize (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D28606
AFFECTED FILES
src/declarativeimports/plasmacomponents/qml/ToolButton.qml
src/declarativeimports/plasmastyle/ToolButtonStyle.qml
To: ndavis, #plasma
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200406/f4a39b97/attachment.html>
More information about the Kde-frameworks-devel
mailing list