Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/plasmacomponents3/Button.qml
Show All 39 Lines | 27 | T.Button { | |||
---|---|---|---|---|---|
40 | 40 | | |||
41 | Kirigami.MnemonicData.enabled: control.enabled && control.visible | 41 | Kirigami.MnemonicData.enabled: control.enabled && control.visible | ||
42 | Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.SecondaryControl | 42 | Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.SecondaryControl | ||
43 | Kirigami.MnemonicData.label: control.text | 43 | Kirigami.MnemonicData.label: control.text | ||
44 | 44 | | |||
45 | contentItem: RowLayout { | 45 | contentItem: RowLayout { | ||
46 | PlasmaCore.IconItem { | 46 | PlasmaCore.IconItem { | ||
47 | id: icon | 47 | id: icon | ||
48 | Layout.fillWidth: true | 48 | | ||
49 | Layout.fillHeight: true | 49 | Layout.fillWidth: control.icon.width <= 0 | ||
50 | Layout.fillHeight: control.icon.height <= 0 | ||||
51 | Layout.preferredWidth: control.icon.width > 0 ? control.icon.width : units.iconSizes.small | ||||
52 | Layout.preferredHeight: control.icon.height > 0 ? control.icon.height : units.iconSizes.small | ||||
53 | | ||||
50 | colorGroup: PlasmaCore.Theme.ButtonColorGroup | 54 | colorGroup: PlasmaCore.Theme.ButtonColorGroup | ||
51 | visible: source.length > 0 | 55 | visible: source.length > 0 | ||
52 | source: control.icon ? (control.icon.name || control.icon.source) : "" | 56 | source: control.icon ? (control.icon.name || control.icon.source) : "" | ||
53 | status: buttonSvg.hasElement("hint-focus-highlighted-background") && control.activeFocus && !control.pressed && !control.checked ? PlasmaCore.Svg.Selected : PlasmaCore.Svg.Normal | 57 | status: buttonSvg.hasElement("hint-focus-highlighted-background") && control.activeFocus && !control.pressed && !control.checked ? PlasmaCore.Svg.Selected : PlasmaCore.Svg.Normal | ||
54 | } | 58 | } | ||
55 | Label { | 59 | Label { | ||
56 | Layout.fillWidth: true | 60 | Layout.fillWidth: true | ||
57 | Layout.fillHeight: true | 61 | Layout.fillHeight: true | ||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |