Commit 92cd7451 authored by Nate Graham's avatar Nate Graham
Browse files

applets/notifications: address TODO by using PlaceholderMessage subtitle

Now that we depend on a new enough version of PlaceholderMessage, we can
use its explanation: property to display a subtitle, rather than a child
Label item.
parent da8a82fa
Pipeline #156707 passed with stage
in 6 minutes and 33 seconds
......@@ -562,29 +562,18 @@ PlasmaExtras.Representation {
}
PlasmaExtras.PlaceholderMessage {
// Checking valid to avoid creating ServerInfo object if everything is alright
readonly property NotificationManager.ServerInfo currentOwner: !NotificationManager.Server.valid ? NotificationManager.Server.currentOwner
: null
anchors.centerIn: parent
width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
text: i18n("Notification service not available")
explanation: currentOwner && currentOwner.vendor && currentOwner.name
? i18nc("Vendor and product name", "Notifications are currently provided by '%1 %2'", currentOwner.vendor, currentOwner.name)
: ""
visible: list.count === 0 && !NotificationManager.Server.valid
// TODO: port to using the subtitle property once it exists
PlasmaComponents3.Label {
// Checking valid to avoid creating ServerInfo object if everything is alright
readonly property NotificationManager.ServerInfo currentOwner: !NotificationManager.Server.valid ? NotificationManager.Server.currentOwner
: null
// PlasmaExtras.PlaceholderMessage is internally a ColumnLayout,
// so we can use Layout.whatever properties here
Layout.fillWidth: true
wrapMode: Text.WordWrap
text: currentOwner ? i18nc("Vendor and product name",
"Notifications are currently provided by '%1 %2'",
currentOwner.vendor,
currentOwner.name)
: ""
visible: currentOwner && currentOwner.vendor && currentOwner.name
}
}
}
}
......
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