Search-enable the application page

Usually the application page is not the top level page (you'll usually
navigate through it using one of the app lists), but when it is, this
patch ensures that the search field is displayed, and further ensures
that the search is performed on the full list of resources. This will
happen when Discover is launched e.g. from krunner or otherwise
requested to show a specific application on launch.

Differential Revision: https://phabricator.kde.org/D18320
parent b69b12c3
......@@ -32,6 +32,18 @@ DiscoverPage {
readonly property int visibleReviews: 3
clip: true
// Usually this page is not the top level page, but when we are, isHome being
// true will ensure that the search field suggests we are searching in the list
// of available apps, not inside the app page itself. This will happen when
// Discover is launched e.g. from krunner or otherwise requested to show a
// specific application on launch.
readonly property bool isHome: true
function searchFor(text) {
if (text.length === 0)
return;
Navigation.openCategory(null, "")
}
background: Rectangle {
color: Kirigami.Theme.backgroundColor
Kirigami.Theme.colorSet: Kirigami.Theme.View
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment