Make the search message dialog header way prettier, like it is in KCMs

I think I've heard of this before...
This commit is contained in:
Joshua Goins
2024-01-13 16:37:17 -05:00
parent 08a0fbfd6b
commit 2247a2a7af

View File

@@ -26,24 +26,38 @@ Kirigami.ScrollablePage {
room: root.currentRoom room: root.currentRoom
} }
header: RowLayout { 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
}
}
}
contentItem: RowLayout {
spacing: Kirigami.Units.largeSpacing
Kirigami.SearchField { Kirigami.SearchField {
id: searchField id: searchField
focus: true focus: true
Layout.topMargin: Kirigami.Units.smallSpacing
Layout.leftMargin: Kirigami.Units.smallSpacing
Layout.fillWidth: true Layout.fillWidth: true
Keys.onEnterPressed: searchButton.clicked() Keys.onEnterPressed: searchButton.clicked()
Keys.onReturnPressed: searchButton.clicked() Keys.onReturnPressed: searchButton.clicked()
} }
QQC2.Button { QQC2.Button {
id: searchButton id: searchButton
Layout.topMargin: Kirigami.Units.smallSpacing
Layout.rightMargin: Kirigami.Units.smallSpacing
onClicked: searchModel.search() onClicked: searchModel.search()
icon.name: "search" icon.name: "search"
} }
} }
}
ListView { ListView {
id: messageListView id: messageListView