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
95ce08e7
Commit
95ce08e7
authored
Jan 09, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ui/modules/Linphone/SmartSearchBar): handle correctly mouse hover header
parent
c5427180
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
95 additions
and
86 deletions
+95
-86
SmartSearchBar.qml
tests/ui/modules/Linphone/SmartSearchBar.qml
+95
-86
No files found.
tests/ui/modules/Linphone/SmartSearchBar.qml
View file @
95ce08e7
...
@@ -17,9 +17,11 @@ SearchBox {
...
@@ -17,9 +17,11 @@ SearchBox {
signal
launchCall
(
string
sipAddress
)
signal
launchCall
(
string
sipAddress
)
signal
launchVideoCall
(
string
sipAddress
)
signal
launchVideoCall
(
string
sipAddress
)
// ---------------------------------------------------------------------------
// Header.
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
header
:
Column
{
header
:
MouseArea
{
readonly
property
string
interpretableSipAddress
:
SipAddressesModel
.
interpretUrl
(
searchBox
.
filter
)
readonly
property
string
interpretableSipAddress
:
SipAddressesModel
.
interpretUrl
(
searchBox
.
filter
)
height
:
{
height
:
{
...
@@ -28,123 +30,130 @@ SearchBox {
...
@@ -28,123 +30,130 @@ SearchBox {
}
}
width
:
parent
.
width
width
:
parent
.
width
spacing
:
0
// Workaround to handle mouse.
// Without it, the mouse can be given to items list when it is hover header.
hoverEnabled
:
true
// -------------------------------------------------------------------------
Column
{
// Default contact.
anchors.fill
:
parent
// -------------------------------------------------------------------------
Loader
{
spacing
:
0
id
:
defaultContact
height
:
searchBox
.
entryHeight
// -----------------------------------------------------------------------
width
:
parent
.
width
// Default contact.
// -----------------------------------------------------------------------
visible
:
interpretableSipAddress
.
length
>
0
Loader
{
id
:
defaultContact
sourceComponent
:
Rectangle
{
height
:
searchBox
.
entryHeight
anchors.fill
:
parent
width
:
parent
.
width
color
:
SmartSearchBarStyle
.
entry
.
color
.
normal
RowLayout
{
visible
:
interpretableSipAddress
.
length
>
0
anchors
{
fill
:
parent
rightMargin
:
SmartSearchBarStyle
.
entry
.
rightMargin
}
spacing
:
0
Contact
{
sourceComponent
:
Rectangle
{
id
:
contact
anchors.fill
:
parent
color
:
SmartSearchBarStyle
.
entry
.
color
.
normal
Layout.fillHeight
:
true
RowLayout
{
Layout.fillWidth
:
true
anchors
{
entry
:
Object
({
fill
:
parent
sipAddress
:
interpretableSipAddress
rightMargin
:
SmartSearchBarStyle
.
entry
.
rightMargin
}
)
}
}
spacing
:
0
ActionBar
{
Contact
{
iconSize
:
SmartSearchBarStyle
.
entry
.
iconSize
id
:
contact
ActionButton
{
Layout.fillHeight
:
true
icon
:
'
video_call
'
Layout.fillWidth
:
true
onClicked
:
{
entry
:
Object
({
searchBox
.
hideMenu
()
sipAddress
:
interpretableSipAddress
searchBox
.
launchVideoCall
(
interpretableSipAddress
)
})
}
}
}
ActionButton
{
ActionBar
{
icon
:
'
call
'
iconSize
:
SmartSearchBarStyle
.
entry
.
iconSize
onClicked
:
{
searchBox
.
hideMenu
()
ActionButton
{
searchBox
.
launchCall
(
interpretableSipAddress
)
icon
:
'
video_call
'
onClicked
:
{
searchBox
.
hideMenu
()
searchBox
.
launchVideoCall
(
interpretableSipAddress
)
}
}
ActionButton
{
icon
:
'
call
'
onClicked
:
{
searchBox
.
hideMenu
()
searchBox
.
launchCall
(
interpretableSipAddress
)
}
}
}
}
ActionButton
{
ActionButton
{
icon
:
'
chat
'
icon
:
'
chat
'
onClicked
:
{
onClicked
:
{
searchBox
.
hideMenu
()
searchBox
.
hideMenu
()
searchBox
.
launchChat
(
interpretableSipAddress
)
searchBox
.
launchChat
(
interpretableSipAddress
)
}
}
}
}
}
}
}
}
}
}
}
}
// --
-----------------------------------------------------------------------
//
-----------------------------------------------------------------------
// Add contact button.
// Add contact button.
// --
-----------------------------------------------------------------------
//
-----------------------------------------------------------------------
MouseArea
{
MouseArea
{
id
:
addContactButton
id
:
addContactButton
height
:
SmartSearchBarStyle
.
header
.
addButtonHeight
height
:
SmartSearchBarStyle
.
header
.
addButtonHeight
width
:
parent
.
width
width
:
parent
.
width
onClicked
:
{
onClicked
:
{
searchBox
.
hideMenu
()
searchBox
.
hideMenu
()
searchBox
.
addContact
(
interpretableSipAddress
)
searchBox
.
addContact
(
interpretableSipAddress
)
}
}
Rectangle
{
Rectangle
{
anchors.fill
:
parent
anchors.fill
:
parent
color
:
parent
.
pressed
color
:
parent
.
pressed
?
SmartSearchBarStyle
.
header
.
color
.
pressed
?
SmartSearchBarStyle
.
header
.
color
.
pressed
:
SmartSearchBarStyle
.
header
.
color
.
normal
:
SmartSearchBarStyle
.
header
.
color
.
normal
Text
{
Text
{
anchors
{
anchors
{
left
:
parent
.
left
left
:
parent
.
left
leftMargin
:
SmartSearchBarStyle
.
header
.
leftMargin
leftMargin
:
SmartSearchBarStyle
.
header
.
leftMargin
verticalCenter
:
parent
.
verticalCenter
verticalCenter
:
parent
.
verticalCenter
}
}
font
{
font
{
bold
:
true
bold
:
true
pointSize
:
SmartSearchBarStyle
.
header
.
text
.
fontSize
pointSize
:
SmartSearchBarStyle
.
header
.
text
.
fontSize
}
color
:
addContactButton
.
pressed
?
SmartSearchBarStyle
.
header
.
text
.
color
.
pressed
:
SmartSearchBarStyle
.
header
.
text
.
color
.
normal
text
:
qsTr
(
'
addContact
'
)
}
}
color
:
addContactButton
.
pressed
?
SmartSearchBarStyle
.
header
.
text
.
color
.
pressed
:
SmartSearchBarStyle
.
header
.
text
.
color
.
normal
text
:
qsTr
(
'
addContact
'
)
}
Icon
{
Icon
{
anchors
{
anchors
{
right
:
parent
.
right
right
:
parent
.
right
rightMargin
:
SmartSearchBarStyle
.
header
.
rightMargin
rightMargin
:
SmartSearchBarStyle
.
header
.
rightMargin
verticalCenter
:
parent
.
verticalCenter
verticalCenter
:
parent
.
verticalCenter
}
icon
:
'
contact_add
'
iconSize
:
SmartSearchBarStyle
.
header
.
iconSize
}
}
icon
:
'
contact_add
'
iconSize
:
SmartSearchBarStyle
.
header
.
iconSize
}
}
}
}
}
}
}
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// Entries.
// Entries.
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
...
...
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