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
a4cfd667
Commit
a4cfd667
authored
Oct 27, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): add `Menu/ActionMenuEntry`
parent
f68e544a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
51 deletions
+66
-51
resources.qrc
tests/resources.qrc
+1
-0
ActionMenu.qml
tests/ui/modules/Common/Menu/ActionMenu.qml
+0
-43
ActionMenuEntry.qml
tests/ui/modules/Common/Menu/ActionMenuEntry.qml
+48
-0
qmldir
tests/ui/modules/Common/qmldir
+1
-0
CallControls.qml
tests/ui/modules/Linphone/Call/CallControls.qml
+16
-8
No files found.
tests/resources.qrc
View file @
a4cfd667
...
...
@@ -49,6 +49,7 @@
<file>
ui/modules/Common/Image/Icon.qml
</file>
<file>
ui/modules/Common/Image/RoundedImage.qml
</file>
<file>
ui/modules/Common/InvertedMouseArea.qml
</file>
<file>
ui/modules/Common/Menu/ActionMenuEntry.qml
</file>
<file>
ui/modules/Common/Menu/ActionMenu.qml
</file>
<file>
ui/modules/Common/Menu/Menu.qml
</file>
<file>
ui/modules/Common/Paned.qml
</file>
...
...
tests/ui/modules/Common/Menu/ActionMenu.qml
View file @
a4cfd667
...
...
@@ -10,51 +10,8 @@ import Common.Styles 1.0
ColumnLayout
{
id
:
menu
signal
clicked
(
int
entry
)
spacing
:
ActionMenuStyle
.
spacing
property
int
entryHeight
property
int
entryWidth
property
var
entries
Repeater
{
model
:
entries
Rectangle
{
color
:
mouseArea
.
pressed
?
ActionMenuStyle
.
entry
.
color
.
pressed
:
(
mouseArea
.
containsMouse
?
ActionMenuStyle
.
entry
.
color
.
hovered
:
ActionMenuStyle
.
entry
.
color
.
normal
)
height
:
menu
.
entryHeight
width
:
menu
.
entryWidth
Text
{
anchors
{
left
:
parent
.
left
leftMargin
:
ActionMenuStyle
.
entry
.
leftMargin
right
:
parent
.
right
rightMargin
:
ActionMenuStyle
.
entry
.
rightMargin
}
color
:
ActionMenuStyle
.
entry
.
text
.
color
elide
:
Text
.
ElideRight
font.pointSize
:
ActionMenuStyle
.
entry
.
text
.
fontSize
height
:
parent
.
height
text
:
modelData
verticalAlignment
:
Text
.
AlignVCenter
}
MouseArea
{
id
:
mouseArea
anchors.fill
:
parent
hoverEnabled
:
true
onClicked
:
menu
.
clicked
(
index
)
}
}
}
}
tests/ui/modules/Common/Menu/ActionMenuEntry.qml
0 → 100644
View file @
a4cfd667
import
QtQuick
2.7
import
Common
.
Styles
1.0
// ===================================================================
Rectangle
{
id
:
entry
property
alias
text
:
text
.
text
signal
clicked
color
:
mouseArea
.
pressed
?
ActionMenuStyle
.
entry
.
color
.
pressed
:
(
mouseArea
.
containsMouse
?
ActionMenuStyle
.
entry
.
color
.
hovered
:
ActionMenuStyle
.
entry
.
color
.
normal
)
height
:
parent
.
entryHeight
width
:
parent
.
entryWidth
Text
{
id
:
text
anchors
{
left
:
parent
.
left
leftMargin
:
ActionMenuStyle
.
entry
.
leftMargin
right
:
parent
.
right
rightMargin
:
ActionMenuStyle
.
entry
.
rightMargin
}
color
:
ActionMenuStyle
.
entry
.
text
.
color
elide
:
Text
.
ElideRight
font.pointSize
:
ActionMenuStyle
.
entry
.
text
.
fontSize
height
:
parent
.
height
verticalAlignment
:
Text
.
AlignVCenter
}
MouseArea
{
id
:
mouseArea
anchors.fill
:
parent
hoverEnabled
:
true
onClicked
:
entry
.
clicked
}
}
tests/ui/modules/Common/qmldir
View file @
a4cfd667
...
...
@@ -50,6 +50,7 @@ InvertedMouseArea 1.0 InvertedMouseArea.qml
# Menu
ActionMenu 1.0 Menu/ActionMenu.qml
ActionMenuEntry 1.0 Menu/ActionMenuEntry.qml
Menu 1.0 Menu/Menu.qml
# Paned
...
...
tests/ui/modules/Linphone/Call/CallControls.qml
View file @
a4cfd667
...
...
@@ -62,15 +62,23 @@ RowLayout {
entryHeight
:
22
entryWidth
:
120
entries
:
[
qsTr
(
'
acceptAudioCall
'
),
qsTr
(
'
acceptVideoCall
'
),
qsTr
(
'
hangup
'
)
]
onClicked
:
{
console
.
log
(
'
entry
'
,
entry
)
menu
.
hideMenu
()
ActionMenuEntry
{
text
:
qsTr
(
'
acceptAudioCall
'
)
onClicked
:
menu
.
hideMenu
()
}
ActionMenuEntry
{
text
:
qsTr
(
'
acceptVideoCall
'
)
onClicked
:
menu
.
hideMenu
()
}
ActionMenuEntry
{
text
:
qsTr
(
'
hangup
'
)
onClicked
:
menu
.
hideMenu
()
}
}
}
...
...
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