From c8d53b9e794ac42646f365dd774d014a1833f12c Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sun, 28 Apr 2024 23:18:05 +0200 Subject: [PATCH] Cleanup quick switcher - Make it modal - Fix spacing - Use bottom separator instead of frame for search field (cherry picked from commit fe6ff9b2b6a44b081474be36c754fece1f351810) --- src/qml/QuickSwitcher.qml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/qml/QuickSwitcher.qml b/src/qml/QuickSwitcher.qml index 02f18f589..46cf4fcf5 100644 --- a/src/qml/QuickSwitcher.qml +++ b/src/qml/QuickSwitcher.qml @@ -16,16 +16,18 @@ QQC2.Dialog { required property NeoChatConnection connection - parent: applicationWindow().overlay + parent: QQC2.Overlay.overlay width: Math.min(700, parent.width) height: 400 - leftPadding: Kirigami.Units.smallSpacing - rightPadding: Kirigami.Units.smallSpacing - bottomPadding: Kirigami.Units.smallSpacing - topPadding: Kirigami.Units.smallSpacing + leftPadding: 0 + rightPadding: 0 + bottomPadding: 1 // HACK fix graphical glitch in the bottom + topPadding: 0 - anchors.centerIn: applicationWindow().overlay + anchors.centerIn: parent + + modal: true Shortcut { sequence: "Ctrl+K" @@ -44,9 +46,17 @@ QQC2.Dialog { background: DialogRoundedBackground {} contentItem: ColumnLayout { + spacing: 0 + Kirigami.SearchField { id: searchField + Layout.fillWidth: true + + background: null + + Layout.margins: Kirigami.Units.smallSpacing + Keys.onDownPressed: { roomList.forceActiveFocus(); if (roomList.currentIndex < roomList.count - 1) { @@ -74,6 +84,10 @@ QQC2.Dialog { onTextChanged: RoomManager.sortFilterRoomListModel.filterText = text } + Kirigami.Separator { + Layout.fillWidth: true + } + QQC2.ScrollView { clip: true