Changeset View
Changeset View
Standalone View
Standalone View
discover/qml/DiscoverDrawer.qml
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 29 | Kirigami.GlobalDrawer { | |||
---|---|---|---|---|---|
63 | 63 | | |||
64 | function suggestSearchText(text) { | 64 | function suggestSearchText(text) { | ||
65 | toploader.item.text = text | 65 | toploader.item.text = text | ||
66 | toploader.item.forceActiveFocus() | 66 | toploader.item.forceActiveFocus() | ||
67 | } | 67 | } | ||
68 | topContent: ConditionalLoader { | 68 | topContent: ConditionalLoader { | ||
69 | id: toploader | 69 | id: toploader | ||
70 | condition: !modal | 70 | condition: !modal | ||
71 | focus: true | ||||
71 | Layout.fillWidth: true | 72 | Layout.fillWidth: true | ||
72 | componentFalse: Item { | 73 | componentFalse: Item { | ||
73 | Layout.minimumHeight: 1 | 74 | Layout.minimumHeight: 1 | ||
74 | } | 75 | } | ||
75 | componentTrue: Kirigami.AbstractApplicationHeader { | 76 | componentTrue: Kirigami.AbstractApplicationHeader { | ||
76 | preferredHeight: 40 // Match Kirigami.ToolBarApplicationHeader, which is hardcoded to this | 77 | preferredHeight: 40 // Match Kirigami.ToolBarApplicationHeader, which is hardcoded to this | ||
77 | 78 | | |||
78 | RowLayout { | 79 | RowLayout { | ||
79 | anchors.fill: parent | 80 | anchors.fill: parent | ||
80 | anchors.leftMargin: Kirigami.Units.smallSpacing | 81 | anchors.leftMargin: Kirigami.Units.smallSpacing | ||
81 | anchors.rightMargin: Kirigami.Units.smallSpacing | 82 | anchors.rightMargin: Kirigami.Units.smallSpacing | ||
82 | 83 | | |||
83 | SearchField { | 84 | SearchField { | ||
84 | id: searchField | 85 | id: searchField | ||
85 | 86 | | |||
86 | Layout.fillWidth: true | 87 | Layout.fillWidth: true | ||
88 | focus: true | ||||
87 | 89 | | |||
88 | visible: window.leftPage && (window.leftPage.searchFor !== null || window.leftPage.hasOwnProperty("search")) | 90 | visible: window.leftPage && (window.leftPage.searchFor !== null || window.leftPage.hasOwnProperty("search")) | ||
89 | 91 | | |||
90 | page: window.leftPage | 92 | page: window.leftPage | ||
91 | 93 | | |||
92 | onCurrentSearchTextChanged: { | 94 | onCurrentSearchTextChanged: { | ||
93 | var curr = window.leftPage; | 95 | var curr = window.leftPage; | ||
94 | 96 | | |||
▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines |