From 2247a2a7afd7f6280184d0ca510e277ee278b04c Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 13 Jan 2024 16:37:17 -0500 Subject: [PATCH] Make the search message dialog header way prettier, like it is in KCMs I think I've heard of this before... --- src/qml/SearchPage.qml | 44 ++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/src/qml/SearchPage.qml b/src/qml/SearchPage.qml index 2fb310496..3b3ef28f3 100644 --- a/src/qml/SearchPage.qml +++ b/src/qml/SearchPage.qml @@ -26,22 +26,36 @@ Kirigami.ScrollablePage { room: root.currentRoom } - header: RowLayout { - Kirigami.SearchField { - id: searchField - focus: true - Layout.topMargin: Kirigami.Units.smallSpacing - Layout.leftMargin: Kirigami.Units.smallSpacing - Layout.fillWidth: true - Keys.onEnterPressed: searchButton.clicked() - Keys.onReturnPressed: searchButton.clicked() + header: QQC2.Control { + padding: Kirigami.Units.largeSpacing + + background: Rectangle { + color: Kirigami.Theme.backgroundColor + + Kirigami.Separator { + anchors { + left: parent.left + bottom: parent.bottom + right: parent.right + } + } } - QQC2.Button { - id: searchButton - Layout.topMargin: Kirigami.Units.smallSpacing - Layout.rightMargin: Kirigami.Units.smallSpacing - onClicked: searchModel.search() - icon.name: "search" + + contentItem: RowLayout { + spacing: Kirigami.Units.largeSpacing + + Kirigami.SearchField { + id: searchField + focus: true + Layout.fillWidth: true + Keys.onEnterPressed: searchButton.clicked() + Keys.onReturnPressed: searchButton.clicked() + } + QQC2.Button { + id: searchButton + onClicked: searchModel.search() + icon.name: "search" + } } }