Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/plasmacomponents3/ToolButton.qml
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 28 | T.ToolButton { | |||
---|---|---|---|---|---|
44 | Kirigami.MnemonicData.label: control.text | 44 | Kirigami.MnemonicData.label: control.text | ||
45 | 45 | | |||
46 | flat: true | 46 | flat: true | ||
47 | 47 | | |||
48 | contentItem: GridLayout { | 48 | contentItem: GridLayout { | ||
49 | columns: control.display == T.AbstractButton.TextBesideIcon ? 2 : 1 | 49 | columns: control.display == T.AbstractButton.TextBesideIcon ? 2 : 1 | ||
50 | PlasmaCore.IconItem { | 50 | PlasmaCore.IconItem { | ||
51 | id: icon | 51 | id: icon | ||
52 | Layout.fillWidth: true | 52 | | ||
53 | Layout.fillHeight: true | 53 | Layout.fillWidth: control.icon.width <= 0 | ||
54 | Layout.fillHeight: control.icon.height <= 0 | ||||
55 | Layout.preferredWidth: control.icon.width > 0 ? control.icon.width : units.iconSizes.smallMedium | ||||
56 | Layout.preferredHeight: control.icon.height > 0 ? control.icon.height : units.iconSizes.smallMedium | ||||
57 | | ||||
54 | colorGroup: PlasmaCore.Theme.ButtonColorGroup | 58 | colorGroup: PlasmaCore.Theme.ButtonColorGroup | ||
55 | visible: source.length > 0 | 59 | visible: source.length > 0 | ||
56 | source: control.icon ? (control.icon.name || control.icon.source) : "" | 60 | source: control.icon ? (control.icon.name || control.icon.source) : "" | ||
57 | status: control.activeFocus && !control.pressed && !control.checked ? PlasmaCore.Svg.Selected : PlasmaCore.Svg.Normal | 61 | status: control.activeFocus && !control.pressed && !control.checked ? PlasmaCore.Svg.Selected : PlasmaCore.Svg.Normal | ||
58 | } | 62 | } | ||
59 | PlasmaCore.FrameSvgItem { | 63 | PlasmaCore.FrameSvgItem { | ||
60 | id: buttonsurfaceChecker | 64 | id: buttonsurfaceChecker | ||
61 | visible: false | 65 | visible: false | ||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |