Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/plasmacomponents3/Button.qml
Show All 36 Lines | 27 | T.Button { | |||
---|---|---|---|---|---|
37 | bottomPadding: surfaceNormal.margins.bottom | 37 | bottomPadding: surfaceNormal.margins.bottom | ||
38 | 38 | | |||
39 | hoverEnabled: !Kirigami.Settings.tabletMode | 39 | hoverEnabled: !Kirigami.Settings.tabletMode | ||
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: GridLayout { | ||
46 | columns: control.display == T.AbstractButton.TextBesideIcon ? 2 : 1 | ||||
46 | PlasmaCore.IconItem { | 47 | PlasmaCore.IconItem { | ||
47 | id: icon | 48 | id: icon | ||
48 | Layout.fillWidth: true | 49 | Layout.fillWidth: true | ||
49 | Layout.fillHeight: true | 50 | Layout.fillHeight: true | ||
50 | colorGroup: PlasmaCore.Theme.ButtonColorGroup | 51 | colorGroup: PlasmaCore.Theme.ButtonColorGroup | ||
51 | visible: source.length > 0 | 52 | visible: source.length > 0 | ||
52 | source: control.icon ? (control.icon.name || control.icon.source) : "" | 53 | 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 | 54 | status: buttonSvg.hasElement("hint-focus-highlighted-background") && control.activeFocus && !control.pressed && !control.checked ? PlasmaCore.Svg.Selected : PlasmaCore.Svg.Normal | ||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |