Launcher: defer visibility when results are ready.

This commit is contained in:
ItsLemmy
2025-10-04 17:15:18 -04:00
parent d8099c2446
commit d3616f7f26
+15
View File
@@ -34,6 +34,7 @@ NPanel {
property var results: []
property var plugins: []
property var activePlugin: null
property bool resultsReady: false
readonly property int badgeSize: Math.round(Style.baseWidgetSize * 1.6 * scaling)
readonly property int entryHeight: Math.round(badgeSize + Style.marginM * 2 * scaling)
@@ -92,12 +93,18 @@ NPanel {
// Lifecycle
onOpened: {
resultsReady = false
// Notify plugins
for (let plugin of plugins) {
if (plugin.onOpened)
plugin.onOpened()
}
updateResults()
Qt.callLater(() => {
resultsReady = true
})
}
onClosed: {
@@ -145,6 +152,14 @@ NPanel {
panelContent: Rectangle {
id: ui
color: Color.transparent
opacity: resultsReady ? 1.0 : 0.0
Behavior on opacity {
NumberAnimation {
duration: Style.animationFast
easing.type: Easing.OutCirc
}
}
// ---------------------
// Navigation