Commit bcf8b851 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Main/MainWindow): force collapsed when smart search bar is opened on linux

parent 54f28831
......@@ -28,6 +28,7 @@ Item {
signal menuClosed
signal menuOpened
signal menuRequested
signal enterPressed
// ---------------------------------------------------------------------------
......@@ -73,7 +74,13 @@ Item {
searchBox.enterPressed()
}
onActiveFocusChanged: activeFocus && searchBox.showMenu()
onActiveFocusChanged: {
if (activeFocus) {
searchBox.menuRequested()
searchBox.showMenu()
}
}
onTextChanged: _filter(text)
}
......@@ -118,7 +125,7 @@ Item {
script: {
menu.showMenu()
menuOpened()
searchBox.menuOpened()
}
}
},
......@@ -132,7 +139,7 @@ Item {
menu.hideMenu()
searchField.focus = false
menuClosed()
searchBox.menuClosed()
}
}
}
......
......@@ -32,6 +32,7 @@ Item {
signal menuClosed
signal menuOpened
signal menuRequested
signal enterPressed
// ---------------------------------------------------------------------------
......@@ -71,7 +72,7 @@ Item {
implicitHeight: searchField.height
Item {
implicitHeight: searchField.height + menu.height
implicitHeight: searchField.height
width: parent.width
TextField {
......@@ -86,7 +87,13 @@ Item {
searchBox.enterPressed()
}
onActiveFocusChanged: activeFocus && searchBox.showMenu()
onActiveFocusChanged: {
if (activeFocus) {
searchBox.menuRequested()
searchBox.showMenu()
}
}
onTextChanged: _filter(text)
}
......@@ -151,7 +158,7 @@ Item {
menu.showMenu()
desktopPopup.show()
menuOpened()
searchBox.menuOpened()
}
}
},
......@@ -166,7 +173,7 @@ Item {
searchField.focus = false
desktopPopup.hide()
menuClosed()
searchBox.menuClosed()
}
}
}
......
......@@ -192,6 +192,10 @@ Controls1.ApplicationWindow {
sipAddress: sipAddress
})
onEntryClicked: window.setView(entry.contact ? 'ContactEdit' : 'Conversation', {
sipAddress: entry.sipAddress
})
onLaunchCall: CallsListModel.launchAudioCall(sipAddress)
onLaunchChat: window.setView('Conversation', {
sipAddress: sipAddress
......@@ -199,9 +203,8 @@ Controls1.ApplicationWindow {
onLaunchVideoCall: CallsListModel.launchVideoCall(sipAddress)
onEntryClicked: window.setView(entry.contact ? 'ContactEdit' : 'Conversation', {
sipAddress: entry.sipAddress
})
// Specific linux action..
onMenuRequested: Qt.platform.os === 'linux' && collapse.setCollapsed(true)
}
}
}
......
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