Commit 7e6e8e97 authored by Nate Graham's avatar Nate Graham 🔩
Browse files

[applet] put both placeholder message in the same object

This saves a tiny bit of memory and also fixes a subtle bug whereby one
of the invisible messages was providing the necessary width for the
other message to be displayed correctly.
parent 0d8b5a6c
......@@ -621,19 +621,20 @@ Item {
}
}
}
PlasmaExtras.PlaceholderMessage {
width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
anchors.centerIn: parent
visible: streamsView.visible && !sinkInputView.count && !sourceOutputView.count
text: i18n("No applications playing or recording audio")
}
PlasmaExtras.PlaceholderMessage {
width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
anchors.centerIn: parent
visible: devicesView.visible && !sinkView.count && !sourceView.count
text: i18n("No output or input devices found")
PlasmaExtras.PlaceholderMessage {
width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
anchors.centerIn: parent
visible: text.length != 0
text: {
if (streamsView.visible && !sinkInputView.count && !sourceOutputView.count) {
return i18n("No applications playing or recording audio")
} else if (devicesView.visible && !sinkView.count && !sourceView.count) {
return i18n("No output or input devices found")
} else {
return ""
}
}
}
......
Markdown is supported
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