Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/main.qml
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Line(s) | 162 | if (!volumeFeedback) { | |||
---|---|---|---|---|---|
163 | return; | 163 | return; | ||
164 | } | 164 | } | ||
165 | if (sinkIndex == undefined) { | 165 | if (sinkIndex == undefined) { | ||
166 | sinkIndex = sinkModel.preferredSink.index; | 166 | sinkIndex = sinkModel.preferredSink.index; | ||
167 | } | 167 | } | ||
168 | feedback.play(sinkIndex); | 168 | feedback.play(sinkIndex); | ||
169 | } | 169 | } | ||
170 | 170 | | |||
171 | SinkModel { | ||||
172 | id: sinkModel | ||||
173 | } | ||||
174 | | ||||
171 | Plasmoid.compactRepresentation: PlasmaCore.IconItem { | 175 | Plasmoid.compactRepresentation: PlasmaCore.IconItem { | ||
172 | source: plasmoid.icon | 176 | source: plasmoid.icon | ||
173 | active: mouseArea.containsMouse | 177 | active: mouseArea.containsMouse | ||
174 | colorGroup: PlasmaCore.ColorScope.colorGroup | 178 | colorGroup: PlasmaCore.ColorScope.colorGroup | ||
175 | 179 | | |||
176 | MouseArea { | 180 | MouseArea { | ||
177 | id: mouseArea | 181 | id: mouseArea | ||
178 | 182 | | |||
▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | |||||
264 | VolumeOSD { | 268 | VolumeOSD { | ||
265 | id: osd | 269 | id: osd | ||
266 | } | 270 | } | ||
267 | 271 | | |||
268 | VolumeFeedback { | 272 | VolumeFeedback { | ||
269 | id: feedback | 273 | id: feedback | ||
270 | } | 274 | } | ||
271 | 275 | | |||
272 | RowLayout { | 276 | Plasmoid.fullRepresentation: ColumnLayout { | ||
273 | id: tabBarRow | 277 | spacing: units.smallSpacing | ||
274 | 278 | | |||
275 | anchors { | 279 | RowLayout { | ||
276 | top: parent.top | 280 | spacing: units.smallSpacing | ||
277 | left: parent.left | 281 | Layout.fillWidth: true | ||
278 | right: parent.right | | |||
279 | } | | |||
280 | 282 | | |||
281 | PlasmaComponents.TabBar { | 283 | PlasmaComponents.TabBar { | ||
282 | id: tabBar | 284 | id: tabBar | ||
283 | Layout.fillWidth: true | 285 | Layout.fillWidth: true | ||
284 | activeFocusOnTab: true | 286 | activeFocusOnTab: true | ||
285 | 287 | | |||
286 | PlasmaComponents.TabButton { | 288 | PlasmaComponents.TabButton { | ||
287 | id: devicesTab | 289 | id: devicesTab | ||
Show All 15 Lines | 304 | onClicked: { | |||
303 | plasmoid.action("configure").trigger(); | 305 | plasmoid.action("configure").trigger(); | ||
304 | } | 306 | } | ||
305 | } | 307 | } | ||
306 | } | 308 | } | ||
307 | 309 | | |||
308 | PlasmaExtras.ScrollArea { | 310 | PlasmaExtras.ScrollArea { | ||
309 | id: scrollView; | 311 | id: scrollView; | ||
310 | 312 | | |||
311 | anchors { | 313 | Layout.fillWidth: true | ||
312 | top: tabBarRow.bottom | 314 | Layout.fillHeight: true | ||
313 | topMargin: units.smallSpacing | | |||
314 | left: parent.left | | |||
315 | right: parent.right | | |||
316 | bottom: parent.bottom | | |||
317 | } | | |||
318 | 315 | | |||
319 | horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff | 316 | horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff | ||
320 | flickableItem.boundsBehavior: Flickable.StopAtBounds; | 317 | flickableItem.boundsBehavior: Flickable.StopAtBounds; | ||
321 | 318 | | |||
322 | //our scroll isn't a list of delegates, all internal items are tab focussable, making this redundant | 319 | //our scroll isn't a list of delegates, all internal items are tab focussable, making this redundant | ||
323 | activeFocusOnTab: false | 320 | activeFocusOnTab: false | ||
324 | 321 | | |||
325 | Item { | 322 | Item { | ||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | 393 | ListView { | |||
398 | 395 | | |||
399 | Layout.fillWidth: true | 396 | Layout.fillWidth: true | ||
400 | Layout.minimumHeight: contentHeight | 397 | Layout.minimumHeight: contentHeight | ||
401 | Layout.maximumHeight: contentHeight | 398 | Layout.maximumHeight: contentHeight | ||
402 | 399 | | |||
403 | model: PulseObjectFilterModel { | 400 | model: PulseObjectFilterModel { | ||
404 | sortRole: "SortByDefault" | 401 | sortRole: "SortByDefault" | ||
405 | sortOrder: Qt.DescendingOrder | 402 | sortOrder: Qt.DescendingOrder | ||
406 | sourceModel: SinkModel { | 403 | sourceModel: sinkModel | ||
407 | id: sinkModel | | |||
408 | } | | |||
409 | } | 404 | } | ||
410 | boundsBehavior: Flickable.StopAtBounds; | 405 | boundsBehavior: Flickable.StopAtBounds; | ||
411 | delegate: DeviceListItem { | 406 | delegate: DeviceListItem { | ||
412 | type: "sink" | 407 | type: "sink" | ||
413 | } | 408 | } | ||
414 | } | 409 | } | ||
415 | 410 | | |||
416 | Header { | 411 | Header { | ||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 450 | PlasmaExtras.Heading { | |||
461 | text: i18n("No output or input devices found") | 456 | text: i18n("No output or input devices found") | ||
462 | wrapMode: Text.WordWrap | 457 | wrapMode: Text.WordWrap | ||
463 | verticalAlignment: Text.AlignVCenter | 458 | verticalAlignment: Text.AlignVCenter | ||
464 | horizontalAlignment: Text.AlignHCenter | 459 | horizontalAlignment: Text.AlignHCenter | ||
465 | } | 460 | } | ||
466 | } | 461 | } | ||
467 | } | 462 | } | ||
468 | } | 463 | } | ||
464 | } |