From b560ad56b670420da8537b08384af97e9533e39b Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 6 Feb 2024 19:53:21 +0200 Subject: [PATCH] tabbox: Add a placeholder message in the thumbnails grid switcher It improves the visuals of the switcher when there are no entries to display. --- src/tabbox/switchers/thumbnail_grid/contents/ui/main.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tabbox/switchers/thumbnail_grid/contents/ui/main.qml b/src/tabbox/switchers/thumbnail_grid/contents/ui/main.qml index 582ea94603..30b0863f1d 100644 --- a/src/tabbox/switchers/thumbnail_grid/contents/ui/main.qml +++ b/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();