effects/windowview: Turn placeholder on when there are actually no visible windows
This may happen when all windows are minimized, and the effect was started in "Window class on current desktop" mode (Ctrl+F7). BUG: 459244 FIXED-IN: 5.26
This commit is contained in:
parent
d32aebb747
commit
8ac4901068
2 changed files with 12 additions and 1 deletions
|
@ -26,6 +26,16 @@ FocusScope {
|
|||
property alias model: windowsRepeater.model
|
||||
property alias delegate: windowsRepeater.delegate
|
||||
readonly property alias count: windowsRepeater.count
|
||||
readonly property bool activeEmpty: {
|
||||
var children = expoLayout.visibleChildren;
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
var child = children[i];
|
||||
if (child instanceof WindowHeapDelegate && !child.activeHidden) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
property alias layout: expoLayout
|
||||
property int selectedIndex: -1
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
SPDX-FileCopyrightText: 2022 ivan tkachenko <me@ratijas.tk>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
@ -92,7 +93,7 @@ Item {
|
|||
PlasmaExtras.PlaceholderMessage {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width - (PlasmaCore.Units.gridUnit * 8)
|
||||
visible: heap.count === 0
|
||||
visible: heap.activeEmpty
|
||||
iconName: "edit-none"
|
||||
text: effect.searchText.length > 0 ? i18nd("kwin_effects", "No Matches") : i18nd("kwin_effects", "No Windows")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue