Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/ListItemBase.qml
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Line(s) | 101 | PlasmaExtras.Heading { | |||
---|---|---|---|---|---|
103 | Layout.fillWidth: true | 103 | Layout.fillWidth: true | ||
104 | level: 5 | 104 | level: 5 | ||
105 | opacity: 0.6 | 105 | opacity: 0.6 | ||
106 | wrapMode: Text.NoWrap | 106 | wrapMode: Text.NoWrap | ||
107 | elide: Text.ElideRight | 107 | elide: Text.ElideRight | ||
108 | } | 108 | } | ||
109 | PlasmaComponents.ToolButton { | 109 | PlasmaComponents.ToolButton { | ||
110 | id: contextMenuButton | 110 | id: contextMenuButton | ||
111 | Layout.preferredHeight: slider.height | 111 | Layout.preferredHeight: units.iconSizes.small | ||
112 | Layout.preferredWidth: Layout.preferredHeight | 112 | Layout.preferredWidth: Layout.preferredHeight | ||
113 | checkable: true | 113 | checkable: true | ||
114 | iconName: "application-menu" | | |||
115 | onClicked: contextMenu.show() | 114 | onClicked: contextMenu.show() | ||
115 | | ||||
116 | PlasmaCore.IconItem { | ||||
117 | anchors.fill: parent | ||||
118 | source: "application-menu" | ||||
119 | | ||||
120 | // From Plasma's ToolButtonStyle: | ||||
121 | active: parent.hovered | ||||
122 | colorGroup: parent.hovered ? PlasmaCore.Theme.ButtonColorGroup : PlasmaCore.ColorScope.colorGroup | ||||
drosca: Do we really need this (we certainly don't need the `parent.flat` part)? It doesn't seem to… | |||||
Not really. Just wanted to have consistent code with ToolButtonStyle, but I already had to change control => parent so might as well remove it. ToolButton is basically a flat: true Button so that part will always be !true/false. Zren: Not really. Just wanted to have consistent code with ToolButtonStyle, but I already had to… | |||||
As for active+colorGroup, you'll notice the hover effect if you change the icon to something with color, like source: "plasma". The default hover effect doesn't do much (white overlay on white symbolic icon) with breeze, but might be necessary for other themes. Zren: As for active+colorGroup, you'll notice the hover effect if you change the icon to something… | |||||
123 | } | ||||
116 | } | 124 | } | ||
117 | } | 125 | } | ||
118 | 126 | | |||
119 | RowLayout { | 127 | RowLayout { | ||
120 | PlasmaCore.IconItem { | 128 | PlasmaCore.IconItem { | ||
121 | readonly property bool isPlayback: type.substring(0, 4) == "sink" | 129 | readonly property bool isPlayback: type.substring(0, 4) == "sink" | ||
122 | roundToIconSize: false | 130 | roundToIconSize: false | ||
123 | Layout.preferredWidth: Math.round(slider.height * 0.95) | 131 | Layout.preferredWidth: Math.round(slider.height * 0.95) | ||
▲ Show 20 Lines • Show All 189 Lines • Show Last 20 Lines |
Do we really need this (we certainly don't need the parent.flat part)? It doesn't seem to change the icon at all.