applets/clipboard: Give PlaceholderMessage an icon

Use "edit-paste" when there is no history item, or "edit-none" when the
filter returns nothing.
wilder-5.25
Fushan Wen 4 years ago committed by Nate Graham
parent 2242972a1f
commit 154c53f481
  1. 5
      applets/clipboard/contents/ui/Menu.qml

@ -71,11 +71,14 @@ PlasmaComponents3.ScrollView {
PlasmaExtras.PlaceholderMessage { PlasmaExtras.PlaceholderMessage {
id: emptyHint id: emptyHint
readonly property bool hasText: model.filterRegExp.length > 0
anchors.centerIn: parent anchors.centerIn: parent
width: parent.width - (PlasmaCore.Units.largeSpacing * 4) width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
visible: menuListView.count === 0 visible: menuListView.count === 0
text: model.filterRegExp.length > 0 ? i18n("No matches") : i18n("Clipboard is empty") iconName: hasText ? "edit-none" : "edit-paste"
text: hasText ? i18n("No matches") : i18n("Clipboard is empty")
} }
} }
} }

Loading…
Cancel
Save