tabbox: Add a placeholder message in the thumbnails grid switcher

It improves the visuals of the switcher when there are no entries to display.
This commit is contained in:
Vlad Zahorodnii 2024-02-06 19:53:21 +02:00
parent 3714dcc337
commit b560ad56b6

View file

@ -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();