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
4634f4ce
Commit
4634f4ce
authored
Dec 28, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/modules/Common/SearchBox): supports headers
parent
e017c542
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
36 additions
and
40 deletions
+36
-40
AbstractDropDownMenu.qml
tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml
+8
-9
DesktopPopup.qml
tests/ui/modules/Common/Popup/DesktopPopup.qml
+3
-4
DropDownDynamicMenu.qml
tests/ui/modules/Common/Popup/DropDownDynamicMenu.qml
+8
-1
DropDownMenu.qml
tests/ui/modules/Common/Popup/DropDownMenu.qml
+4
-2
PopupShadow.qml
tests/ui/modules/Common/Popup/PopupShadow.qml
+1
-1
SearchBox.qml
tests/ui/modules/Common/SearchBox.qml
+2
-1
ScrollableListView.qml
tests/ui/modules/Common/View/ScrollableListView.qml
+1
-1
Contact.qml
tests/ui/modules/Linphone/Contact/Contact.qml
+1
-1
SmartSearchBar.qml
tests/ui/modules/Linphone/SmartSearchBar.qml
+8
-20
No files found.
tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml
View file @
4634f4ce
...
@@ -4,9 +4,9 @@ import Common 1.0
...
@@ -4,9 +4,9 @@ import Common 1.0
import
Common
.
Styles
1.0
import
Common
.
Styles
1.0
import
Utils
1.0
import
Utils
1.0
// ===================================================================
// ===================================================================
==========
// Low component to display a list/menu in a popup.
// Low component to display a list/menu in a popup.
// ===================================================================
// ===================================================================
==========
Item
{
Item
{
id
:
menu
id
:
menu
...
@@ -27,7 +27,7 @@ Item {
...
@@ -27,7 +27,7 @@ Item {
signal
menuClosed
signal
menuClosed
signal
menuOpened
signal
menuOpened
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
function
isOpen
()
{
function
isOpen
()
{
return
_isOpen
return
_isOpen
...
@@ -58,7 +58,7 @@ Item {
...
@@ -58,7 +58,7 @@ Item {
throw
new
Error
(
'
Virtual method must be implemented.
'
)
throw
new
Error
(
'
Virtual method must be implemented.
'
)
}
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
implicitHeight
:
0
implicitHeight
:
0
opacity
:
0
opacity
:
0
...
@@ -74,7 +74,7 @@ Item {
...
@@ -74,7 +74,7 @@ Item {
}
}
}
}
//
Block
clicks, wheel... below menu.
//
Handle
clicks, wheel... below menu.
MouseArea
{
MouseArea
{
anchors.fill
:
parent
anchors.fill
:
parent
hoverEnabled
:
true
hoverEnabled
:
true
...
@@ -100,14 +100,13 @@ Item {
...
@@ -100,14 +100,13 @@ Item {
enabled
:
parent
.
visible
enabled
:
parent
.
visible
onPressed
:
{
onPressed
:
{
if
(
launcher
!=
null
&&
pointIsInItem
(
launcher
))
{
if
(
launcher
==
null
||
!
pointIsInItem
(
launcher
))
{
return
hideMenu
()
}
}
hideMenu
()
}
}
}
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
states
:
State
{
states
:
State
{
name
:
'
opened
'
name
:
'
opened
'
...
...
tests/ui/modules/Common/Popup/DesktopPopup.qml
View file @
4634f4ce
...
@@ -3,7 +3,7 @@ import QtQuick.Window 2.2
...
@@ -3,7 +3,7 @@ import QtQuick.Window 2.2
import
Common
.
Styles
1.0
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
Item
{
Item
{
id
:
wrapper
id
:
wrapper
...
@@ -27,7 +27,7 @@ Item {
...
@@ -27,7 +27,7 @@ Item {
_isOpen
=
false
_isOpen
=
false
}
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
// DO NOT TOUCH THIS PROPERTIES.
// DO NOT TOUCH THIS PROPERTIES.
...
@@ -51,12 +51,11 @@ Item {
...
@@ -51,12 +51,11 @@ Item {
Item
{
Item
{
id
:
content
id
:
content
// Fake parent.
property
var
$parent
:
wrapper
property
var
$parent
:
wrapper
}
}
}
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
states
:
State
{
states
:
State
{
name
:
'
opened
'
name
:
'
opened
'
...
...
tests/ui/modules/Common/Popup/DropDownDynamicMenu.qml
View file @
4634f4ce
import
QtQuick
2.7
import
Utils
1.0
import
Utils
1.0
// =============================================================================
// =============================================================================
...
@@ -11,13 +13,18 @@ AbstractDropDownMenu {
...
@@ -11,13 +13,18 @@ AbstractDropDownMenu {
property
int
maxMenuHeight
property
int
maxMenuHeight
function
_computeHeight
()
{
function
_computeHeight
()
{
var
list
=
_content
[
0
]
Utils
.
assert
(
_content
!=
null
&&
_content
.
length
>
0
,
'
`_content` cannot be null and must exists.
'
)
var
list
=
_content
[
0
]
Utils
.
assert
(
list
!=
null
,
'
No list found.
'
)
Utils
.
assert
(
list
!=
null
,
'
No list found.
'
)
Utils
.
assert
(
Utils
.
qmlTypeof
(
list
,
'
QQuickListView
'
),
'
No list view parameter.
'
)
Utils
.
assert
(
Utils
.
qmlTypeof
(
list
,
'
QQuickListView
'
),
'
No list view parameter.
'
)
var
height
=
list
.
count
*
entryHeight
var
height
=
list
.
count
*
entryHeight
if
(
list
.
headerPositioning
===
ListView
.
OverlayHeader
)
{
height
+=
list
.
headerItem
.
height
}
return
(
maxMenuHeight
!==
undefined
&&
height
>
maxMenuHeight
)
return
(
maxMenuHeight
!==
undefined
&&
height
>
maxMenuHeight
)
?
maxMenuHeight
?
maxMenuHeight
:
height
:
height
...
...
tests/ui/modules/Common/Popup/DropDownMenu.qml
View file @
4634f4ce
// ===================================================================
import
Utils
1.0
// =============================================================================
// Menu which supports menu like `ActionMenu` or `Menu`.
// Menu which supports menu like `ActionMenu` or `Menu`.
// ===================================================================
// ===================================================================
==========
AbstractDropDownMenu
{
AbstractDropDownMenu
{
function
_computeHeight
()
{
function
_computeHeight
()
{
...
...
tests/ui/modules/Common/Popup/PopupShadow.qml
View file @
4634f4ce
...
@@ -2,7 +2,7 @@ import QtGraphicalEffects 1.0
...
@@ -2,7 +2,7 @@ import QtGraphicalEffects 1.0
import
Common
.
Styles
1.0
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
DropShadow
{
DropShadow
{
color
:
PopupStyle
.
shadow
.
color
color
:
PopupStyle
.
shadow
.
color
...
...
tests/ui/modules/Common/SearchBox.qml
View file @
4634f4ce
...
@@ -12,7 +12,7 @@ import Utils 1.0
...
@@ -12,7 +12,7 @@ import Utils 1.0
Item
{
Item
{
id
:
searchBox
id
:
searchBox
property
alias
header
:
menu
.
header
property
alias
header
:
list
.
header
property
alias
delegate
:
list
.
delegate
property
alias
delegate
:
list
.
delegate
property
alias
entryHeight
:
menu
.
entryHeight
property
alias
entryHeight
:
menu
.
entryHeight
...
@@ -105,6 +105,7 @@ Item {
...
@@ -105,6 +105,7 @@ Item {
id
:
list
id
:
list
anchors.fill
:
parent
anchors.fill
:
parent
headerPositioning
:
header
?
ListView
.
OverlayHeader
:
ListView
.
InlineFooter
}
}
}
}
}
}
...
...
tests/ui/modules/Common/View/ScrollableListView.qml
View file @
4634f4ce
...
@@ -3,7 +3,7 @@ import QtQuick.Controls 2.0
...
@@ -3,7 +3,7 @@ import QtQuick.Controls 2.0
import
Common
1.0
import
Common
1.0
// ===================================================================
// ===================================================================
==========
ListView
{
ListView
{
ScrollBar.vertical
:
ForceScrollBar
{
ScrollBar.vertical
:
ForceScrollBar
{
...
...
tests/ui/modules/Linphone/Contact/Contact.qml
View file @
4634f4ce
...
@@ -34,7 +34,7 @@ Rectangle {
...
@@ -34,7 +34,7 @@ Rectangle {
Layout.preferredHeight
:
ContactStyle
.
contentHeight
Layout.preferredHeight
:
ContactStyle
.
contentHeight
Layout.preferredWidth
:
ContactStyle
.
contentHeight
Layout.preferredWidth
:
ContactStyle
.
contentHeight
image
:
_contact
&&
_contact
.
vcard
.
avatar
image
:
_contact
&&
_contact
.
vcard
.
avatar
presenceLevel
:
_contact
?
contact
.
presenceLevel
:
Presence
.
White
presenceLevel
:
_contact
?
_
contact
.
presenceLevel
:
Presence
.
White
username
:
LinphoneUtils
.
getContactUsername
(
_contact
||
sipAddress
)
username
:
LinphoneUtils
.
getContactUsername
(
_contact
||
sipAddress
)
}
}
...
...
tests/ui/modules/Linphone/SmartSearchBar.qml
View file @
4634f4ce
...
@@ -3,7 +3,6 @@ import QtQuick.Layouts 1.3
...
@@ -3,7 +3,6 @@ import QtQuick.Layouts 1.3
import
Common
1.0
import
Common
1.0
import
Linphone
1.0
import
Linphone
1.0
import
LinphoneUtils
1.0
// =============================================================================
// =============================================================================
...
@@ -13,7 +12,12 @@ SearchBox {
...
@@ -13,7 +12,12 @@ SearchBox {
header
:
Rectangle
{
header
:
Rectangle
{
color
:
'
#4B5964
'
color
:
'
#4B5964
'
height
:
40
height
:
40
width
:
10
width
:
parent
.
width
MouseArea
{
anchors.fill
:
parent
hoverEnabled
:
true
}
}
}
delegate
:
Rectangle
{
delegate
:
Rectangle
{
...
@@ -40,34 +44,18 @@ SearchBox {
...
@@ -40,34 +44,18 @@ SearchBox {
RowLayout
{
RowLayout
{
anchors
{
anchors
{
fill
:
parent
fill
:
parent
leftMargin
:
22
rightMargin
:
10
rightMargin
:
10
}
}
spacing
:
15
spacing
:
0
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Contact or address info
// Contact or address info
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
Avatar
{
Contact
{
id
:
avatar
Layout.preferredHeight
:
30
Layout.preferredWidth
:
30
image
:
$entry
.
contact
&&
$entry
.
contact
.
vcard
.
avatar
presenceLevel
:
$entry
.
contact
?
$entry
.
contact
.
presenceLevel
:
-
1
username
:
LinphoneUtils
.
getContactUsername
(
$entry
.
contact
||
$entry
.
sipAddress
)
}
ContactDescription
{
Layout.fillHeight
:
true
Layout.fillHeight
:
true
Layout.fillWidth
:
true
Layout.fillWidth
:
true
sipAddress
:
$entry
.
sipAddress
sipAddress
:
$entry
.
sipAddress
sipAddressColor
:
'
#A1A1A1
'
username
:
avatar
.
username
usernameColor
:
'
#4B5964
'
}
}
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
...
...
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