Commit f7687b01 authored by Nate Graham's avatar Nate Graham 🔩

Port Clipboard and Notifications applets to Kirigami.PlaceholderMessage

Summary:
The Clipboard and Notifications applets live in plasma-workspace; port them to use
Kirigami.PlaceholderMessage

Test Plan:
Clipboard: {F8253980}
Notifications: {F8253981}

Reviewers: #vdg, #plasma, broulik, niccolove, cblack

Reviewed By: #vdg, #plasma, niccolove, cblack

Subscribers: plasma-devel

Tags: #plasma

Maniphest Tasks: T13021

Differential Revision: https://phabricator.kde.org/D29109
parent 9056449e
......@@ -76,18 +76,9 @@ ColumnLayout {
}
}
PlasmaExtras.Heading {
id: emptyHint
Layout.fillWidth: true
level: 3
opacity: 0.6
visible: clipboardMenu.model.count === 0 && filter.length === 0
text: i18n("Clipboard is empty")
}
RowLayout {
Layout.fillWidth: true
visible: !emptyHint.visible
visible: clipboardMenu.model.count > 0
PlasmaComponents.TextField {
id: filter
......
......@@ -20,6 +20,8 @@ import QtQuick 2.0
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.kirigami 2.12 as Kirigami
PlasmaExtras.ScrollArea {
id: menu
property alias view: menuListView
......@@ -52,5 +54,17 @@ PlasmaExtras.ScrollArea {
onBarcode: menu.barcode(uuid)
onAction: menu.action(uuid)
}
Kirigami.PlaceholderMessage {
id: emptyHint
anchors.centerIn: parent
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: units.largeSpacing
visible: menuListView.count === 0
text: i18n("Clipboard is empty")
}
}
}
......@@ -26,7 +26,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.kirigami 2.11 as Kirigami
import org.kde.kirigami 2.12 as Kirigami
import org.kde.kcoreaddons 1.0 as KCoreAddons
......@@ -577,15 +577,14 @@ PlasmaComponents3.Page {
}
}
PlasmaExtras.Heading {
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
level: 3
Kirigami.PlaceholderMessage {
anchors.centerIn: parent
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: units.largeSpacing
text: i18n("No unread notifications")
visible: list.count === 0 && NotificationManager.Server.valid
enabled: false
}
ColumnLayout {
......
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