tabbox: Add a placeholder message in the thumbnails grid switcher

It improves the visuals of the switcher when there are no entries to display.
wilder/Plasma/6.2
Vlad Zahorodnii 2 years ago
parent 3714dcc337
commit b560ad56b6
  1. 8
      src/tabbox/switchers/thumbnail_grid/contents/ui/main.qml

@ -201,6 +201,14 @@ KWin.TabBoxSwitcher {
onCurrentIndexChanged: tabBox.currentIndex = thumbnailGridView.currentIndex;
} // GridView
Kirigami.PlaceholderMessage {
anchors.centerIn: parent
width: parent.width - Kirigami.Units.largeSpacing * 2
icon.source: "edit-none"
text: i18ndc("kwin", "@info:placeholder no entries in the task switcher", "No open windows")
visible: thumbnailGridView.count === 0
}
Keys.onPressed: {
if (event.key == Qt.Key_Left) {
thumbnailGridView.moveCurrentIndexLeft();

Loading…
Cancel
Save