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: units.iconSizes.small | 111 | Layout.preferredHeight: units.iconSizes.small + units.smallSpacing * 2 | ||
112 | Layout.preferredWidth: Layout.preferredHeight | 112 | Layout.preferredWidth: Layout.preferredHeight | ||
113 | checkable: true | 113 | checkable: true | ||
114 | onClicked: contextMenu.show() | 114 | onClicked: contextMenu.show() | ||
115 | 115 | | |||
116 | PlasmaCore.IconItem { | 116 | PlasmaCore.IconItem { | ||
117 | anchors.fill: parent | 117 | anchors.fill: parent | ||
118 | anchors.margins: units.smallSpacing | ||||
118 | source: "application-menu" | 119 | source: "application-menu" | ||
119 | 120 | | |||
120 | // From Plasma's ToolButtonStyle: | 121 | // From Plasma's ToolButtonStyle: | ||
121 | active: parent.hovered | 122 | active: parent.hovered | ||
122 | colorGroup: parent.hovered ? PlasmaCore.Theme.ButtonColorGroup : PlasmaCore.ColorScope.colorGroup | 123 | colorGroup: parent.hovered ? PlasmaCore.Theme.ButtonColorGroup : PlasmaCore.ColorScope.colorGroup | ||
123 | } | 124 | } | ||
124 | } | 125 | } | ||
125 | } | 126 | } | ||
126 | 127 | | |||
127 | RowLayout { | 128 | RowLayout { | ||
128 | PlasmaCore.IconItem { | 129 | PlasmaCore.IconItem { | ||
129 | readonly property bool isPlayback: type.substring(0, 4) == "sink" | 130 | readonly property bool isPlayback: type.substring(0, 4) == "sink" | ||
130 | roundToIconSize: false | 131 | Layout.preferredWidth: units.iconSizes.small | ||
131 | Layout.preferredWidth: Math.round(slider.height * 0.95) | | |||
132 | Layout.preferredHeight: Layout.preferredWidth | 132 | Layout.preferredHeight: Layout.preferredWidth | ||
133 | source: Icon.name(Volume, Muted, isPlayback ? "audio-volume" : "microphone-sensitivity") | 133 | source: Icon.name(Volume, Muted, isPlayback ? "audio-volume" : "microphone-sensitivity") | ||
134 | 134 | | |||
135 | MouseArea { | 135 | MouseArea { | ||
136 | anchors.fill: parent | 136 | anchors.fill: parent | ||
137 | onPressed: Muted = !Muted | 137 | onPressed: Muted = !Muted | ||
138 | } | 138 | } | ||
139 | } | 139 | } | ||
▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines |