windowview: Only create PlaceholderMessage when needed
If there's windows and we're not searching, we don't need the PlaceholderMessage. So only create it when we actually need it to reduce the time needed to activate the effect.
This commit is contained in:
parent
8242584b6e
commit
39a3b53bfb
1 changed files with 7 additions and 4 deletions
|
@ -90,11 +90,12 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
PlasmaExtras.PlaceholderMessage {
|
||||
Loader {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width - (PlasmaCore.Units.gridUnit * 8)
|
||||
|
||||
visible: heap.activeEmpty
|
||||
active: heap.activeEmpty
|
||||
|
||||
// Otherwise it's always 100% opaque even while the blurry desktop background's
|
||||
// opacity is changing, which looks weird and is different from what Overview does.
|
||||
opacity: container.organized ? 1 : 0
|
||||
|
@ -102,9 +103,11 @@ Item {
|
|||
OpacityAnimator { duration: container.effect.animationDuration; easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
sourceComponent: PlasmaExtras.PlaceholderMessage {
|
||||
iconName: "edit-none"
|
||||
text: effect.searchText.length > 0 ? i18nd("kwin_effects", "No Matches") : i18nd("kwin_effects", "No Windows")
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
width: targetScreen.geometry.width
|
||||
|
|
Loading…
Reference in a new issue