Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
5be1c604
Commit
5be1c604
authored
Oct 27, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(MainWindow): close search menu if focus window is lost
parent
4a033737
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
SearchBox.qml
tests/ui/modules/Common/SearchBox.qml
+6
-6
MainWindow.qml
tests/ui/views/MainWindow/MainWindow.qml
+4
-1
No files found.
tests/ui/modules/Common/SearchBox.qml
View file @
5be1c604
...
...
@@ -26,7 +26,7 @@ Item {
signal
menuClosed
signal
menuOpened
function
_
hideMenu
()
{
function
hideMenu
()
{
menu
.
hideMenu
()
shadow
.
visible
=
false
searchField
.
focus
=
false
...
...
@@ -35,7 +35,7 @@ Item {
menuClosed
()
}
function
_
showMenu
()
{
function
showMenu
()
{
menu
.
showMenu
()
shadow
.
visible
=
true
desktopPopup
.
show
()
...
...
@@ -57,9 +57,9 @@ Item {
font.pointSize
:
SearchBoxStyle
.
text
.
fontSize
width
:
parent
.
width
Keys.onEscapePressed
:
_
hideMenu
()
Keys.onEscapePressed
:
searchBox
.
hideMenu
()
onActiveFocusChanged
:
activeFocus
&&
_
showMenu
()
onActiveFocusChanged
:
activeFocus
&&
searchBox
.
showMenu
()
onTextChanged
:
{
model
.
setFilterFixedString
(
text
)
...
...
@@ -91,7 +91,7 @@ Item {
popupX
:
coords
.
x
popupY
:
coords
.
y
onVisibleChanged
:
!
visible
&&
searchBox
.
_
hideMenu
()
onVisibleChanged
:
!
visible
&&
searchBox
.
hideMenu
()
DropDownDynamicMenu
{
id
:
menu
...
...
@@ -99,7 +99,7 @@ Item {
launcher
:
searchField
width
:
searchField
.
width
onMenuClosed
:
_
hideMenu
()
onMenuClosed
:
searchBox
.
hideMenu
()
ScrollableListView
{
id
:
list
...
...
tests/ui/views/MainWindow/MainWindow.qml
View file @
5be1c604
...
...
@@ -111,6 +111,9 @@ ApplicationWindow {
}
}
onActiveFocusItemChanged
:
activeFocusItem
==
null
&&
searchBox
.
hideMenu
()
RowLayout
{
anchors.fill
:
parent
spacing
:
0
...
...
@@ -193,12 +196,12 @@ ApplicationWindow {
}
}
}
// Logo.
Rectangle
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
80
color
:
'
#EAEAEA
'
//a: qsTr("ooo")
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment