updated configuration and launcher, added animations for modules

This commit is contained in:
SomeElse
2026-04-27 07:31:17 +00:00
parent f548be0bfe
commit 7069679ab4
13 changed files with 711 additions and 14 deletions

View File

@@ -33,6 +33,10 @@ PanelWindow {
property bool loading: false
property bool proxyMode: false
// When launcherSelectFirst is true the first result is pre-selected;
// otherwise the list starts with no selection (-1).
readonly property int defaultIndex: Cfg.Config.launcherSelectFirst ? 0 : -1
readonly property var filteredItems: {
const q = searchInput.text.toLowerCase()
if (!q) return allItems.slice(0, 80)
@@ -46,7 +50,7 @@ PanelWindow {
visible = true
_isOpen = true
searchInput.text = ""
resultsList.currentIndex = -1
resultsList.currentIndex = root.defaultIndex
loadItems()
Qt.callLater(() => searchInput.forceActiveFocus())
}
@@ -101,7 +105,11 @@ PanelWindow {
WlrLayershell.namespace: "main-shell-launcher"
WlrLayershell.exclusiveZone: -1
WlrLayershell.keyboardFocus: _isOpen ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
mask: Region { item: clipContainer }
mask: Region { item: (root._isOpen && Cfg.Config.launcherCloseOnClickOutside) ? fullMask : clipContainer }
// Full-screen item used as input mask when click-outside-to-close is enabled.
// Lets the background MouseArea receive events outside the bubble.
Item { id: fullMask; anchors.fill: parent }
Timer {
id: closeTimer
@@ -138,6 +146,15 @@ PanelWindow {
Process { id: launchProc }
// Transparent overlay — captures clicks outside the bubble and closes the
// launcher. Sits below clipContainer in stacking order (declared first),
// so clicks inside the bubble still reach the bubble's own MouseAreas.
MouseArea {
anchors.fill: parent
enabled: root._isOpen && Cfg.Config.launcherCloseOnClickOutside
onClicked: root.close()
}
Item {
id: clipContainer
anchors.horizontalCenter: parent.horizontalCenter
@@ -214,7 +231,7 @@ PanelWindow {
verticalAlignment: TextInput.AlignVCenter
selectionColor: t.launcherAccent
onTextChanged: resultsList.currentIndex = -1
onTextChanged: resultsList.currentIndex = root.defaultIndex
Keys.onReturnPressed: {
if (root.filteredItems.length > 0) {
@@ -329,10 +346,10 @@ PanelWindow {
implicitHeight: Math.min(contentHeight, 400)
clip: true
model: root.filteredItems
currentIndex: -1
currentIndex: root.defaultIndex
spacing: 2
onModelChanged: currentIndex = -1
onModelChanged: currentIndex = root.defaultIndex
ScrollBar.vertical: ScrollBar { policy: ScrollBar.AsNeeded }
delegate: Rectangle {