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
2fa7c843
Commit
2fa7c843
authored
Oct 26, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unstable
parent
e25e77f4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
60 deletions
+48
-60
InvertedMouseArea.qml
tests/ui/modules/Common/InvertedMouseArea.qml
+1
-1
DesktopPopup.qml
tests/ui/modules/Common/Popup/DesktopPopup.qml
+13
-9
SearchBox.qml
tests/ui/modules/Common/SearchBox.qml
+34
-22
utils.js
tests/ui/scripts/Utils/utils.js
+0
-1
MainWindow.qml
tests/ui/views/MainWindow/MainWindow.qml
+0
-27
No files found.
tests/ui/modules/Common/InvertedMouseArea.qml
View file @
2fa7c843
...
@@ -57,7 +57,7 @@ Item {
...
@@ -57,7 +57,7 @@ Item {
function
_checkPosition
(
positionEvent
)
{
function
_checkPosition
(
positionEvent
)
{
// Propagate event.
// Propagate event.
positionEvent
.
accepted
=
false
positionEvent
.
accepted
=
false
console
.
log
(
'
click
'
,
positionEvent
.
x
,
positionEvent
.
y
)
// Click is outside or not.
// Click is outside or not.
if
(
!
Utils
.
pointIsInItem
(
this
,
item
,
positionEvent
))
{
if
(
!
Utils
.
pointIsInItem
(
this
,
item
,
positionEvent
))
{
if
(
_timeout
!=
null
)
{
if
(
_timeout
!=
null
)
{
...
...
tests/ui/modules/Common/Popup/DesktopPopup.qml
View file @
2fa7c843
import
QtQuick
2.7
import
QtQuick
2.7
import
QtQuick
.
Window
2.2
import
QtQuick
.
Window
2.2
import
Utils
1.0
// ===================================================================
Item
{
Item
{
id
:
wrapper
id
:
wrapper
// Not a private property. Can be used with an id.
default
property
alias
content
:
content
.
data
property
alias
popupX
:
popup
.
x
property
alias
popupX
:
popup
.
x
property
alias
popupY
:
popup
.
y
property
alias
popupY
:
popup
.
y
default
property
alias
_content
:
content
.
data
function
show
()
{
function
show
()
{
popup
.
show
()
popup
.
show
()
}
}
...
@@ -20,18 +19,23 @@ Item {
...
@@ -20,18 +19,23 @@ Item {
popup
.
hide
()
popup
.
hide
()
}
}
x
:
0
// DO NOT TOUCH THIS PROPERTIES.
y
:
0
// No visible.
visible
:
false
// No size, no position.
height
:
0
height
:
0
width
:
0
width
:
0
visible
:
false
x
:
0
y
:
0
Window
{
Window
{
id
:
popup
id
:
popup
flags
:
Qt
.
SplashScreen
flags
:
Qt
.
SplashScreen
height
:
wrapper
.
content
[
0
]
!=
null
?
wrapper
.
content
[
0
].
height
:
0
height
:
_content
[
0
]
!=
null
?
_
content
[
0
].
height
:
0
width
:
wrapper
.
content
[
0
]
!=
null
?
wrapper
.
content
[
0
].
width
:
0
width
:
_content
[
0
]
!=
null
?
_
content
[
0
].
width
:
0
Item
{
Item
{
id
:
content
id
:
content
...
...
tests/ui/modules/Common/SearchBox.qml
View file @
2fa7c843
...
@@ -2,7 +2,7 @@ import QtQuick 2.7
...
@@ -2,7 +2,7 @@ import QtQuick 2.7
import
QtQuick
.
Controls
2.0
import
QtQuick
.
Controls
2.0
import
Common
.
Styles
1.0
import
Common
.
Styles
1.0
import
Utils
1.0
// ===================================================================
// ===================================================================
// A reusable search input which display a entries model in a menu.
// A reusable search input which display a entries model in a menu.
// Each entry can be filtered with the search input.
// Each entry can be filtered with the search input.
...
@@ -30,6 +30,7 @@ Item {
...
@@ -30,6 +30,7 @@ Item {
menu
.
hideMenu
()
menu
.
hideMenu
()
shadow
.
visible
=
false
shadow
.
visible
=
false
searchField
.
focus
=
false
searchField
.
focus
=
false
desktopPopup
.
hide
()
menuClosed
()
menuClosed
()
}
}
...
@@ -37,16 +38,11 @@ Item {
...
@@ -37,16 +38,11 @@ Item {
function
_showMenu
()
{
function
_showMenu
()
{
menu
.
showMenu
()
menu
.
showMenu
()
shadow
.
visible
=
true
shadow
.
visible
=
true
desktopPopup
.
show
()
menuOpened
()
menuOpened
()
}
}
function
getMenuInstance
()
{
console
.
log
(
'
instance parent
'
,
Utils
.
getTopParent
(
item
))
return
menu
}
implicitHeight
:
searchField
.
height
implicitHeight
:
searchField
.
height
Item
{
Item
{
...
@@ -73,28 +69,44 @@ Item {
...
@@ -73,28 +69,44 @@ Item {
}
}
}
}
DropDownDynamicMenu
{
PopupShadow
{
id
:
menu
id
:
shadow
//anchors.top: searchField.bottom
anchors.fill
:
searchField
launcher
:
searchField
source
:
searchField
width
:
searchField
.
width
visible
:
false
}
onMenuClosed
:
_hideMenu
()
DesktopPopup
{
id
:
desktopPopup
ScrollableListView
{
property
point
coords
:
{
id
:
list
var
point
=
searchBox
.
mapToItem
(
null
,
0
,
searchBox
.
height
)
point
.
x
+=
window
.
x
point
.
y
+=
window
.
y
anchors.fill
:
pare
nt
return
poi
nt
}
}
}
PopupShadow
{
popupX
:
coords
.
x
id
:
shadow
popupY
:
coords
.
y
anchors.fill
:
searchField
onVisibleChanged
:
!
visible
&&
searchBox
.
_hideMenu
()
source
:
searchField
visible
:
false
DropDownDynamicMenu
{
id
:
menu
launcher
:
searchField
width
:
searchField
.
width
onMenuClosed
:
_hideMenu
()
ScrollableListView
{
id
:
list
anchors.fill
:
parent
}
}
}
}
}
}
}
}
tests/ui/scripts/Utils/utils.js
View file @
2fa7c843
...
@@ -148,7 +148,6 @@ function qmlTypeof (object, className) {
...
@@ -148,7 +148,6 @@ function qmlTypeof (object, className) {
function
pointIsInItem
(
source
,
target
,
point
)
{
function
pointIsInItem
(
source
,
target
,
point
)
{
point
=
source
.
mapToItem
(
target
.
parent
,
point
.
x
,
point
.
y
)
point
=
source
.
mapToItem
(
target
.
parent
,
point
.
x
,
point
.
y
)
console
.
log
(
'
mapped point
'
,
point
.
x
,
point
.
y
,
target
.
x
,
target
.
y
)
return
(
return
(
point
.
x
>=
target
.
x
&&
point
.
x
>=
target
.
x
&&
point
.
y
>=
target
.
y
&&
point
.
y
>=
target
.
y
&&
...
...
tests/ui/views/MainWindow/MainWindow.qml
View file @
2fa7c843
...
@@ -71,24 +71,6 @@ ApplicationWindow {
...
@@ -71,24 +71,6 @@ ApplicationWindow {
onClicked
:
Utils
.
openWindow
(
'
NewCall
'
,
window
)
onClicked
:
Utils
.
openWindow
(
'
NewCall
'
,
window
)
}
}
DesktopPopup
{
id
:
desktopPopup
property
point
coords
:
{
var
point
=
searchBox
.
mapToItem
(
null
,
0
,
searchBox
.
height
)
point
.
x
+=
window
.
x
point
.
y
+=
window
.
y
return
point
}
content
:
searchBox
.
getMenuInstance
()
popupX
:
coords
.
x
popupY
:
coords
.
y
onVisibleChanged
:
!
visible
&&
searchBox
.
_hideMenu
()
}
// Search.
// Search.
SearchBox
{
SearchBox
{
id
:
searchBox
id
:
searchBox
...
@@ -98,15 +80,6 @@ ApplicationWindow {
...
@@ -98,15 +80,6 @@ ApplicationWindow {
placeholderText
:
qsTr
(
'
mainSearchBarPlaceholder
'
)
placeholderText
:
qsTr
(
'
mainSearchBarPlaceholder
'
)
entryHeight
:
50
entryHeight
:
50
onMenuClosed
:
{
console
.
log
(
'
close
'
)
desktopPopup
.
hide
()
}
onMenuOpened
:
{
desktopPopup
.
show
()
}
model
:
model1
model
:
model1
delegate
:
Contact
{
delegate
:
Contact
{
...
...
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