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