Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/main.qml
Show All 33 Lines | 33 | Item { | |||
---|---|---|---|---|---|
34 | id: main | 34 | id: main | ||
35 | 35 | | |||
36 | property bool volumeFeedback: Plasmoid.configuration.volumeFeedback | 36 | property bool volumeFeedback: Plasmoid.configuration.volumeFeedback | ||
37 | property int maxVolumeValue: Math.round(Plasmoid.configuration.maximumVolume * PulseAudio.NormalVolume / 100.0) | 37 | property int maxVolumeValue: Math.round(Plasmoid.configuration.maximumVolume * PulseAudio.NormalVolume / 100.0) | ||
38 | property int volumeStep: Math.round(Plasmoid.configuration.volumeStep * PulseAudio.NormalVolume / 100.0) | 38 | property int volumeStep: Math.round(Plasmoid.configuration.volumeStep * PulseAudio.NormalVolume / 100.0) | ||
39 | property string displayName: i18n("Audio Volume") | 39 | property string displayName: i18n("Audio Volume") | ||
40 | property QtObject draggedStream: null | 40 | property QtObject draggedStream: null | ||
41 | 41 | | |||
42 | Layout.minimumHeight: units.gridUnit * 12 | 42 | Layout.minimumHeight: units.gridUnit * 18 | ||
43 | Layout.minimumWidth: units.gridUnit * 12 | 43 | Layout.minimumWidth: units.gridUnit * 18 | ||
44 | Layout.preferredHeight: units.gridUnit * 20 | 44 | Layout.preferredHeight: units.gridUnit * 20 | ||
45 | Layout.preferredWidth: units.gridUnit * 20 | 45 | Layout.preferredWidth: units.gridUnit * 20 | ||
46 | 46 | | |||
47 | Plasmoid.icon: paSinkModel.preferredSink && !isDummyOutput(paSinkModel.preferredSink) ? Icon.name(paSinkModel.preferredSink.volume, paSinkModel.preferredSink.muted) | 47 | Plasmoid.icon: paSinkModel.preferredSink && !isDummyOutput(paSinkModel.preferredSink) ? Icon.name(paSinkModel.preferredSink.volume, paSinkModel.preferredSink.muted) | ||
48 | : Icon.name(0, true) | 48 | : Icon.name(0, true) | ||
49 | Plasmoid.switchWidth: units.gridUnit * 12 | 49 | Plasmoid.switchWidth: units.gridUnit * 18 | ||
50 | Plasmoid.switchHeight: units.gridUnit * 12 | 50 | Plasmoid.switchHeight: units.gridUnit * 18 | ||
51 | Plasmoid.toolTipMainText: { | 51 | Plasmoid.toolTipMainText: { | ||
52 | var sink = paSinkModel.preferredSink; | 52 | var sink = paSinkModel.preferredSink; | ||
53 | if (!sink) { | 53 | if (!sink) { | ||
54 | return displayName; | 54 | return displayName; | ||
55 | } | 55 | } | ||
56 | 56 | | |||
57 | if (sink.muted) { | 57 | if (sink.muted) { | ||
58 | return i18n("Audio Muted"); | 58 | return i18n("Audio Muted"); | ||
▲ Show 20 Lines • Show All 227 Lines • ▼ Show 20 Line(s) | |||||
286 | } | 286 | } | ||
287 | 287 | | |||
288 | VolumeFeedback { | 288 | VolumeFeedback { | ||
289 | id: feedback | 289 | id: feedback | ||
290 | } | 290 | } | ||
291 | 291 | | |||
292 | Plasmoid.fullRepresentation: ColumnLayout { | 292 | Plasmoid.fullRepresentation: ColumnLayout { | ||
293 | spacing: units.smallSpacing | 293 | spacing: units.smallSpacing | ||
294 | Layout.minimumHeight: main.Layout.minimumHeight | ||||
295 | Layout.minimumWidth: main.Layout.minimumWidth | ||||
294 | 296 | | |||
295 | function beginMoveStream(type, stream) { | 297 | function beginMoveStream(type, stream) { | ||
296 | if (type == "sink") { | 298 | if (type == "sink") { | ||
297 | sourceView.visible = false; | 299 | sourceView.visible = false; | ||
298 | sourceViewHeader.visible = false; | 300 | sourceViewHeader.visible = false; | ||
299 | } else if (type == "source") { | 301 | } else if (type == "source") { | ||
300 | sinkView.visible = false; | 302 | sinkView.visible = false; | ||
301 | sinkViewHeader.visible = false; | 303 | sinkViewHeader.visible = false; | ||
▲ Show 20 Lines • Show All 204 Lines • Show Last 20 Lines |