Skip to content
Snippets Groups Projects
Commit 668b0875 authored by Pierre Lamot's avatar Pierre Lamot Committed by Jean-Baptiste Kempf
Browse files

qml: remove coupling from contentModel to SearchBox

parent 1d8be346
No related branches found
No related tags found
1 merge request!600qml: search box refactoring
......@@ -60,12 +60,19 @@ FocusScope {
searchBox.expanded = true
}
Binding {
target: contentModel
property: "searchPattern"
value: searchBox.searchPattern
when: !!contentModel
}
Widgets.AcrylicBackground {
alternativeColor: VLCStyle.colors.topBanner
anchors.fill: parent
}
Item {
Item {
id: pLBannerSources
property alias model: globalMenuGroup.model
......@@ -377,7 +384,6 @@ FocusScope {
Widgets.SearchBox {
id: searchBox
contentModel: root.contentModel
visible: root.contentModel !== undefined
enabled: visible
height: VLCStyle.bannerButton_height
......
......@@ -29,11 +29,12 @@ FocusScope {
width: content.width
property variant contentModel
property alias buttonWidth: icon.width
property bool expanded: false
property alias searchPattern: searchBox.text
onExpandedChanged: {
if (expanded) {
searchBox.forceActiveFocus()
......@@ -140,11 +141,6 @@ FocusScope {
background: Rectangle { color: "transparent" }
onTextChanged: {
if (contentModel !== undefined)
contentModel.searchPattern = text;
}
Navigation.parentItem: root
Navigation.leftItem: icon
Navigation.rightItem: clearButton.visible ? clearButton : null
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment