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")
property var feedModel: ""
header: RowLayout {
width: parent.width
anchors.topMargin: Kirigami.Units.smallSpacing
Kirigami.SearchField {
id: textField
placeholderText: i18n("Search podcastindex.org")
Layout.fillWidth: true
Layout.leftMargin: Kirigami.Units.smallSpacing
Keys.onReturnPressed: {
searchButton.clicked()
header: Controls.Control {
padding: Kirigami.Units.largeSpacing
Kirigami.Theme.colorSet: Kirigami.Theme.Window
Kirigami.Theme.inherit: false
background: Rectangle {
color: Kirigami.Theme.backgroundColor
Kirigami.Separator {
anchors {
left: parent.left
bottom: parent.bottom
right: parent.right
}
}
}
Controls.Button {
id: searchButton
text: isWidescreen ? i18n("Search") : ""
icon.name: "search"
Layout.rightMargin: Kirigami.Units.smallSpacing
onClicked: {
podcastSearchModel.search(textField.text);
contentItem: RowLayout {
Kirigami.SearchField {
id: textField
placeholderText: i18n("Search podcastindex.org")
Layout.fillWidth: true
Keys.onReturnPressed: {
searchButton.clicked()
}
}
Controls.Button {
id: searchButton
text: isWidescreen ? i18n("Search") : ""
icon.name: "search"
onClicked: {
podcastSearchModel.search(textField.text);
}
}
}
}