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: #plasma, mart, ngraham Subscribers: broulik, apol, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D23367
This commit is contained in:
parent
86021afdf5
commit
069b4e95c1
@ -24,6 +24,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
|
|||||||
import org.kde.kirigami 2.5 as Kirigami
|
import org.kde.kirigami 2.5 as Kirigami
|
||||||
import "private" as Private
|
import "private" as Private
|
||||||
|
|
||||||
|
|
||||||
T.ToolButton {
|
T.ToolButton {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
@ -46,10 +47,13 @@ T.ToolButton {
|
|||||||
|
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
PlasmaCore.IconItem {
|
PlasmaCore.IconItem {
|
||||||
Layout.fillWidth: true
|
id: icon
|
||||||
Layout.fillHeight: true
|
|
||||||
colorGroup: PlasmaCore.ColorScope.colorGroup
|
|
||||||
visible: source.length > 0
|
visible: source.length > 0
|
||||||
|
Layout.fillWidth: control.icon.width <= 0
|
||||||
|
Layout.fillHeight: control.icon.height <= 0
|
||||||
|
Layout.preferredWidth: control.icon.width > 0 ? control.icon.width : -1
|
||||||
|
Layout.preferredHeight: control.icon.height > 0 ? control.icon.height : -1
|
||||||
|
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||||
source: control.icon ? (control.icon.name || control.icon.source) : ""
|
source: control.icon ? (control.icon.name || control.icon.source) : ""
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
|
Loading…
Reference in New Issue
Block a user