Commit 0e8d4688 authored by Fushan Wen's avatar Fushan Wen Committed by Nate Graham
Browse files

applet: Add fallback icons in device view and stream view

For device view, use `audio-volume-muted` if there is no output or input
devices. For stream view, use `edit-none` if there is no applications playing
or recording audio.
parent abf787c6
Pipeline #174536 passed with stage
in 2 minutes and 15 seconds
......@@ -546,6 +546,7 @@ Item {
upperType: "sink"
lowerModel: paSourceFilterModel
lowerType: "source"
iconName: "audio-volume-muted"
placeholderText: i18n("No output or input devices found")
upperDelegate: DeviceListItem {
width: ListView.view.width
......@@ -564,6 +565,7 @@ Item {
upperType: "sink-input"
lowerModel: paSourceOutputFilterModel
lowerType: "source-output"
iconName: "edit-none"
placeholderText: i18n("No applications playing or recording audio")
upperDelegate: StreamListItem {
width: ListView.view.width
......@@ -598,6 +600,7 @@ Item {
required property PulseObjectFilterModel lowerModel
required property string lowerType
required property Component lowerDelegate
property string iconName: null
property string placeholderText: ""
// HACK: workaround for https://bugreports.qt.io/browse/QTBUG-83890
......@@ -610,6 +613,7 @@ Item {
active: visible
visible: scrollView.placeholderText.length > 0 && !upperSection.visible && !lowerSection.visible
sourceComponent: PlasmaExtras.PlaceholderMessage {
iconName: scrollView.iconName
text: scrollView.placeholderText
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment