mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-29 09:49:20 +00:00
feat(ui/views/App/Main/MainWindow): force collapsed when smart search bar is opened on linux
This commit is contained in:
parent
54f288317c
commit
bcf8b85135
3 changed files with 27 additions and 10 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue