Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/plasmacomponents3/TabButton.qml
Show All 39 Lines | 28 | T.TabButton { | |||
---|---|---|---|---|---|
40 | Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.SecondaryControl | 40 | Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.SecondaryControl | ||
41 | Kirigami.MnemonicData.label: control.text | 41 | Kirigami.MnemonicData.label: control.text | ||
42 | 42 | | |||
43 | contentItem: GridLayout { | 43 | contentItem: GridLayout { | ||
44 | columns: control.display == T.AbstractButton.TextBesideIcon ? 2 : 1 | 44 | columns: control.display == T.AbstractButton.TextBesideIcon ? 2 : 1 | ||
45 | PlasmaCore.IconItem { | 45 | PlasmaCore.IconItem { | ||
46 | id: icon | 46 | id: icon | ||
47 | 47 | | |||
48 | Layout.fillWidth: control.icon.width <= 0 | 48 | Layout.alignment: Qt.AlignCenter | ||
49 | Layout.fillHeight: control.icon.height <= 0 | | |||
50 | Layout.preferredWidth: control.icon.width > 0 ? control.icon.width : units.iconSizes.smallMedium | 49 | Layout.preferredWidth: control.icon.width > 0 ? control.icon.width : units.iconSizes.smallMedium | ||
51 | Layout.preferredHeight: control.icon.height > 0 ? control.icon.height : units.iconSizes.smallMedium | 50 | Layout.preferredHeight: control.icon.height > 0 ? control.icon.height : units.iconSizes.smallMedium | ||
52 | 51 | | |||
53 | colorGroup: PlasmaCore.Theme.ButtonColorGroup | 52 | colorGroup: PlasmaCore.Theme.ButtonColorGroup | ||
54 | visible: source.length > 0 | 53 | visible: source.length > 0 | ||
55 | source: control.icon ? (control.icon.name || control.icon.source) : "" | 54 | source: control.icon ? (control.icon.name || control.icon.source) : "" | ||
56 | status: control.activeFocus && !control.pressed && !control.checked ? PlasmaCore.Svg.Selected : PlasmaCore.Svg.Normal | 55 | status: control.activeFocus && !control.pressed && !control.checked ? PlasmaCore.Svg.Selected : PlasmaCore.Svg.Normal | ||
57 | } | 56 | } | ||
Show All 15 Lines |