1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00

Compare commits

...

2 Commits

Author SHA1 Message Date
bbedward
ce40c691e9 niri: remove waitingForResults since it doesnt work and bind to search
term length
2025-11-27 01:47:33 -05:00
bbedward
5b0c38b0ed niri: fix warnings in overview 2025-11-27 01:01:35 -05:00

View File

@@ -48,7 +48,6 @@ Scope {
isClosing = true; isClosing = true;
return; return;
} }
closeOverviewAfterAnim = false;
searchActive = false; searchActive = false;
searchActiveScreen = ""; searchActiveScreen = "";
isClosing = false; isClosing = false;
@@ -175,7 +174,6 @@ Scope {
if (!spotlightContent?.searchField) if (!spotlightContent?.searchField)
return; return;
const trimmedText = event.text.trim(); const trimmedText = event.text.trim();
spotlightContainer.waitingForResults = true;
spotlightContent.searchField.text = trimmedText; spotlightContent.searchField.text = trimmedText;
if (spotlightContent.appLauncher) { if (spotlightContent.appLauncher) {
spotlightContent.appLauncher.searchQuery = trimmedText; spotlightContent.appLauncher.searchQuery = trimmedText;
@@ -194,18 +192,10 @@ Scope {
height: Theme.px(600, overlayWindow.dpr) height: Theme.px(600, overlayWindow.dpr)
readonly property bool animatingOut: niriOverviewScope.isClosing && overlayWindow.isSpotlightScreen readonly property bool animatingOut: niriOverviewScope.isClosing && overlayWindow.isSpotlightScreen
property bool waitingForResults: false
Connections { scale: overlayWindow.shouldShowSpotlight ? 1.0 : 0.96
target: spotlightContent.appLauncher?.model ?? null opacity: overlayWindow.shouldShowSpotlight ? 1 : 0
function onCountChanged() { visible: overlayWindow.shouldShowSpotlight || animatingOut
spotlightContainer.waitingForResults = false;
}
}
scale: (overlayWindow.shouldShowSpotlight && !waitingForResults) ? 1.0 : 0.96
opacity: (overlayWindow.shouldShowSpotlight && !waitingForResults) ? 1 : 0
visible: (overlayWindow.shouldShowSpotlight && !waitingForResults) || animatingOut
enabled: overlayWindow.shouldShowSpotlight enabled: overlayWindow.shouldShowSpotlight
layer.enabled: true layer.enabled: true
@@ -249,6 +239,19 @@ Scope {
property var fakeParentModal: QtObject { property var fakeParentModal: QtObject {
property bool spotlightOpen: spotlightContainer.visible property bool spotlightOpen: spotlightContainer.visible
function hide() { function hide() {
if (spotlightContent.searchField.text.length > 0) {
niriOverviewScope.hideSpotlight();
return;
}
NiriService.toggleOverview();
}
}
Connections {
target: spotlightContent.searchField
function onTextChanged() {
if (spotlightContent.searchField.text.length > 0 || !niriOverviewScope.searchActive)
return;
niriOverviewScope.hideSpotlight(); niriOverviewScope.hideSpotlight();
} }
} }