DiscoverPage: Improve the look of the search bar

Self-explanatory, this makes it look way prettier and less looking like
it was stapled to the top of this page.
This commit is contained in:
Joshua Goins 2025-01-25 19:55:31 -05:00 committed by Bart De Vries
parent 94540746b6
commit 8d3cafbb04

View File

@ -18,27 +18,42 @@ Kirigami.ScrollablePage {
title: i18nc("@title of page allowing to search for new podcasts online", "Discover") title: i18nc("@title of page allowing to search for new podcasts online", "Discover")
property var feedModel: "" property var feedModel: ""
header: RowLayout {
width: parent.width
anchors.topMargin: Kirigami.Units.smallSpacing
Kirigami.SearchField { header: Controls.Control {
id: textField padding: Kirigami.Units.largeSpacing
placeholderText: i18n("Search podcastindex.org")
Layout.fillWidth: true Kirigami.Theme.colorSet: Kirigami.Theme.Window
Layout.leftMargin: Kirigami.Units.smallSpacing Kirigami.Theme.inherit: false
Keys.onReturnPressed: {
searchButton.clicked() background: Rectangle {
color: Kirigami.Theme.backgroundColor
Kirigami.Separator {
anchors {
left: parent.left
bottom: parent.bottom
right: parent.right
}
} }
} }
Controls.Button { contentItem: RowLayout {
id: searchButton Kirigami.SearchField {
text: isWidescreen ? i18n("Search") : "" id: textField
icon.name: "search" placeholderText: i18n("Search podcastindex.org")
Layout.rightMargin: Kirigami.Units.smallSpacing Layout.fillWidth: true
onClicked: { Keys.onReturnPressed: {
podcastSearchModel.search(textField.text); searchButton.clicked()
}
}
Controls.Button {
id: searchButton
text: isWidescreen ? i18n("Search") : ""
icon.name: "search"
onClicked: {
podcastSearchModel.search(textField.text);
}
} }
} }
} }