Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/plasmacomponents3/TabButton.qml
Show All 38 Lines | 28 | T.TabButton { | |||
---|---|---|---|---|---|
39 | Kirigami.MnemonicData.enabled: control.enabled && control.visible | 39 | Kirigami.MnemonicData.enabled: control.enabled && control.visible | ||
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 | Layout.fillWidth: true | 47 | | ||
48 | Layout.fillHeight: true | 48 | Layout.fillWidth: control.icon.width <= 0 | ||
49 | Layout.fillHeight: control.icon.height <= 0 | ||||
50 | Layout.preferredWidth: control.icon.width > 0 ? control.icon.width : -1 | ||||
51 | Layout.preferredHeight: control.icon.height > 0 ? control.icon.height : -1 | ||||
52 | | ||||
49 | colorGroup: PlasmaCore.Theme.ButtonColorGroup | 53 | colorGroup: PlasmaCore.Theme.ButtonColorGroup | ||
50 | visible: source.length > 0 | 54 | visible: source.length > 0 | ||
51 | source: control.icon ? (control.icon.name || control.icon.source) : "" | 55 | source: control.icon ? (control.icon.name || control.icon.source) : "" | ||
52 | status: control.activeFocus && !control.pressed && !control.checked ? PlasmaCore.Svg.Selected : PlasmaCore.Svg.Normal | 56 | status: control.activeFocus && !control.pressed && !control.checked ? PlasmaCore.Svg.Selected : PlasmaCore.Svg.Normal | ||
53 | } | 57 | } | ||
54 | Label { | 58 | Label { | ||
55 | Layout.fillWidth: true | 59 | Layout.fillWidth: true | ||
56 | Layout.fillHeight: true | 60 | Layout.fillHeight: true | ||
57 | visible: text.length > 0 | 61 | visible: text.length > 0 | ||
58 | text: control.Kirigami.MnemonicData.richTextLabel | 62 | text: control.Kirigami.MnemonicData.richTextLabel | ||
59 | font: control.font | 63 | font: control.font | ||
60 | opacity: enabled || control.highlighted || control.checked ? 1 : 0.4 | 64 | opacity: enabled || control.highlighted || control.checked ? 1 : 0.4 | ||
61 | color: control.activeFocus && !control.down ? theme.highlightedTextColor : theme.buttonTextColor | | |||
kossebau: @mart Why did you remove the color here? Seems unrelated to size?
This broke things e.g. with… | |||||
Created a merge request to restore this, as I could not find a reason: kossebau: Created a merge request to restore this, as I could not find a reason:
https://invent.kde. | |||||
62 | horizontalAlignment: Text.AlignHCenter | 65 | horizontalAlignment: Text.AlignHCenter | ||
63 | verticalAlignment: Text.AlignVCenter | 66 | verticalAlignment: Text.AlignVCenter | ||
64 | elide: Text.ElideRight | 67 | elide: Text.ElideRight | ||
65 | } | 68 | } | ||
66 | } | 69 | } | ||
67 | 70 | | |||
68 | background: Item {} | 71 | background: Item {} | ||
69 | } | 72 | } |
@mart Why did you remove the color here? Seems unrelated to size?
This broke things e.g. with Breeze Dark (as can be seen e.g. with the weather widget's tab buttons (use BBC service to have tabs).