make the sizing of the toolbuttons more coherent
Summary: this makes the toolbutton icons follow a standard size. Maybe one could make it follow the icon group size props? like icon.width and icon.height if those props are set. Before patch: {F7274098} After patch: {F7274097} Reviewers: #plasma, mart, ngraham Reviewed By: ngraham Subscribers: apol, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D23367
This commit is contained in:
parent
f973619116
commit
3887f5ec91
@ -45,14 +45,23 @@ T.ToolButton {
|
||||
flat: true
|
||||
|
||||
contentItem: RowLayout {
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.largeSpacing
|
||||
Layout.fillWidth: !label.visible
|
||||
visible: icon.source.length > 0
|
||||
PlasmaCore.IconItem {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
id: icon
|
||||
anchors.centerIn: parent
|
||||
height: Kirigami.Units.iconSizes.smallMedium
|
||||
width: Kirigami.Units.iconSizes.smallMedium
|
||||
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||
visible: source.length > 0
|
||||
source: control.icon ? (control.icon.name || control.icon.source) : ""
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
id: label
|
||||
Layout.fillWidth: true
|
||||
visible: text.length > 0
|
||||
text: control.Kirigami.MnemonicData.richTextLabel
|
||||
|
Loading…
Reference in New Issue
Block a user