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
51b82364
Commit
51b82364
authored
Oct 25, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(Menu): add `ActionMenu`
parent
7b08e105
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
138 additions
and
47 deletions
+138
-47
en.ts
tests/languages/en.ts
+14
-2
fr.ts
tests/languages/fr.ts
+14
-2
resources.qrc
tests/resources.qrc
+4
-2
CaterpillarAnimation.qml
tests/ui/modules/Common/Animations/CaterpillarAnimation.qml
+1
-1
ActionMenu.qml
tests/ui/modules/Common/Menu/ActionMenu.qml
+52
-0
Menu.qml
tests/ui/modules/Common/Menu/Menu.qml
+5
-14
DropDownMenu.qml
tests/ui/modules/Common/Popup/DropDownMenu.qml
+1
-1
ActionMenuStyle.qml
tests/ui/modules/Common/Styles/Menu/ActionMenuStyle.qml
+23
-0
MenuStyle.qml
tests/ui/modules/Common/Styles/Menu/MenuStyle.qml
+0
-0
qmldir
tests/ui/modules/Common/Styles/qmldir
+11
-4
qmldir
tests/ui/modules/Common/qmldir
+2
-1
CallControls.qml
tests/ui/modules/Linphone/Call/CallControls.qml
+11
-20
No files found.
tests/languages/en.ts
View file @
51b82364
...
@@ -5,11 +5,23 @@
...
@@ -5,11 +5,23 @@
<
name
>
CallControls
<
/name
>
<
name
>
CallControls
<
/name
>
<
message
>
<
message
>
<
source
>
homeEntry
<
/source
>
<
source
>
homeEntry
<
/source
>
<
translation
type
=
"
unfinished
"
>
Home
<
/translation
>
<
translation
type
=
"
obsolete
"
>
Home
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
contactsEntry
<
/source
>
<
source
>
contactsEntry
<
/source
>
<
translation
type
=
"
unfinished
"
>
Contacts
<
/translation
>
<
translation
type
=
"
obsolete
"
>
Contacts
<
/translation
>
<
/message
>
<
message
>
<
source
>
acceptAudioCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
acceptVideoCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
hangup
<
/source
>
<
translation
type
=
"
unfinished
"
>
End
call
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
...
tests/languages/fr.ts
View file @
51b82364
...
@@ -5,11 +5,23 @@
...
@@ -5,11 +5,23 @@
<
name
>
CallControls
<
/name
>
<
name
>
CallControls
<
/name
>
<
message
>
<
message
>
<
source
>
homeEntry
<
/source
>
<
source
>
homeEntry
<
/source
>
<
translation
type
=
"
unfinished
"
>
Accueil
<
/translation
>
<
translation
type
=
"
obsolete
"
>
Accueil
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
contactsEntry
<
/source
>
<
source
>
contactsEntry
<
/source
>
<
translation
type
=
"
unfinished
"
>
Contacts
<
/translation
>
<
translation
type
=
"
obsolete
"
>
Contacts
<
/translation
>
<
/message
>
<
message
>
<
source
>
acceptAudioCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
acceptVideoCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
hangup
<
/source
>
<
translation
type
=
"
unfinished
"
>
Fin
d
&
apos
;
appel
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
...
tests/resources.qrc
View file @
51b82364
...
@@ -49,7 +49,8 @@
...
@@ -49,7 +49,8 @@
<file>
ui/modules/Common/Image/Icon.qml
</file>
<file>
ui/modules/Common/Image/Icon.qml
</file>
<file>
ui/modules/Common/Image/RoundedImage.qml
</file>
<file>
ui/modules/Common/Image/RoundedImage.qml
</file>
<file>
ui/modules/Common/InvertedMouseArea.qml
</file>
<file>
ui/modules/Common/InvertedMouseArea.qml
</file>
<file>
ui/modules/Common/Menu.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>
<file>
ui/modules/Common/Paned.qml
</file>
<file>
ui/modules/Common/Popup/AbstractDropDownMenu.qml
</file>
<file>
ui/modules/Common/Popup/AbstractDropDownMenu.qml
</file>
<file>
ui/modules/Common/Popup/DropDownDynamicMenu.qml
</file>
<file>
ui/modules/Common/Popup/DropDownDynamicMenu.qml
</file>
...
@@ -71,7 +72,8 @@
...
@@ -71,7 +72,8 @@
<file>
ui/modules/Common/Styles/Form/TextButtonAStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TextButtonAStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TextButtonBStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TextButtonBStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TransparentComboBoxStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TransparentComboBoxStyle.qml
</file>
<file>
ui/modules/Common/Styles/MenuStyle.qml
</file>
<file>
ui/modules/Common/Styles/Menu/ActionMenuStyle.qml
</file>
<file>
ui/modules/Common/Styles/Menu/MenuStyle.qml
</file>
<file>
ui/modules/Common/Styles/PanedStyle.qml
</file>
<file>
ui/modules/Common/Styles/PanedStyle.qml
</file>
<file>
ui/modules/Common/Styles/PopupStyle.qml
</file>
<file>
ui/modules/Common/Styles/PopupStyle.qml
</file>
<file>
ui/modules/Common/Styles/qmldir
</file>
<file>
ui/modules/Common/Styles/qmldir
</file>
...
...
tests/ui/modules/Common/Animations/CaterpillarAnimation.qml
View file @
51b82364
...
@@ -9,9 +9,9 @@ Row {
...
@@ -9,9 +9,9 @@ Row {
property
color
sphereColor
:
CaterpillarAnimationStyle
.
sphere
.
color
property
color
sphereColor
:
CaterpillarAnimationStyle
.
sphere
.
color
property
int
animationDuration
:
CaterpillarAnimationStyle
.
animation
.
duration
property
int
animationDuration
:
CaterpillarAnimationStyle
.
animation
.
duration
property
int
animationSpace
:
CaterpillarAnimationStyle
.
animation
.
space
property
int
nSpheres
:
CaterpillarAnimationStyle
.
nSpheres
property
int
nSpheres
:
CaterpillarAnimationStyle
.
nSpheres
property
int
sphereSize
:
CaterpillarAnimationStyle
.
sphere
.
size
property
int
sphereSize
:
CaterpillarAnimationStyle
.
sphere
.
size
property
int
animationSpace
:
CaterpillarAnimationStyle
.
animation
.
space
spacing
:
CaterpillarAnimationStyle
.
spacing
spacing
:
CaterpillarAnimationStyle
.
spacing
...
...
tests/ui/modules/Common/Menu/ActionMenu.qml
0 → 100644
View file @
51b82364
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.3
import
Common
.
Styles
1.0
// ===================================================================
// Basic actions menu.
// ===================================================================
ColumnLayout
{
id
:
menu
signal
clicked
(
int
entry
)
spacing
:
ActionMenuStyle
.
spacing
property
int
entryHeight
property
int
entryWidth
property
var
entries
Repeater
{
model
:
entries
Rectangle
{
color
:
ActionMenuStyle
.
entry
.
color
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
font.pointSize
:
ActionMenuStyle
.
entry
.
text
.
fontSize
height
:
parent
.
height
text
:
modelData
verticalAlignment
:
Text
.
AlignVCenter
}
MouseArea
{
anchors.fill
:
parent
hoverEnabled
:
true
onClicked
:
menu
.
clicked
(
index
)
}
}
}
}
tests/ui/modules/Common/Menu.qml
→
tests/ui/modules/Common/Menu
/Menu
.qml
View file @
51b82364
import
QtQuick
2.7
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.3
import
QtQuick
.
Layouts
1.3
import
Common
1.0
import
Common
.
Styles
1.0
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
...
@@ -14,8 +15,6 @@ ColumnLayout {
...
@@ -14,8 +15,6 @@ ColumnLayout {
property
int
entryWidth
property
int
entryWidth
property
var
entries
property
var
entries
property
int
fontSize
:
MenuStyle
.
entry
.
text
.
fontSize
property
int
_selectedEntry
:
0
property
int
_selectedEntry
:
0
signal
entrySelected
(
int
entry
)
signal
entrySelected
(
int
entry
)
...
@@ -50,23 +49,15 @@ ColumnLayout {
...
@@ -50,23 +49,15 @@ ColumnLayout {
spacing
:
MenuStyle
.
entry
.
spacing
spacing
:
MenuStyle
.
entry
.
spacing
Icon
{
Icon
{
Layout.preferredHeight
:
modelData
.
icon
Layout.preferredHeight
:
MenuStyle
.
entry
.
iconSize
?
(
modelData
.
iconSize
!=
null
Layout.preferredWidth
:
MenuStyle
.
entry
.
iconSize
?
modelData
.
iconSize
icon
:
modelData
.
icon
:
MenuStyle
.
entry
.
iconSize
)
:
0
Layout.preferredWidth
:
modelData
.
icon
?
(
modelData
.
iconSize
!=
null
?
modelData
.
iconSize
:
MenuStyle
.
entry
.
iconSize
)
:
0
icon
:
modelData
.
icon
||
''
}
}
Text
{
Text
{
Layout.fillWidth
:
true
Layout.fillWidth
:
true
color
:
MenuStyle
.
entry
.
text
.
color
color
:
MenuStyle
.
entry
.
text
.
color
font.pointSize
:
menu
.
fontSize
font.pointSize
:
MenuStyle
.
entry
.
text
.
fontSize
height
:
parent
.
height
height
:
parent
.
height
text
:
modelData
.
entryName
text
:
modelData
.
entryName
verticalAlignment
:
Text
.
AlignVCenter
verticalAlignment
:
Text
.
AlignVCenter
...
...
tests/ui/modules/Common/Popup/DropDownMenu.qml
View file @
51b82364
AbstractDropDownMenu
{
AbstractDropDownMenu
{
function
_computeHeight
()
{
function
_computeHeight
()
{
return
content
.
height
return
_content
[
0
]
.
height
}
}
}
}
tests/ui/modules/Common/Styles/Menu/ActionMenuStyle.qml
0 → 100644
View file @
51b82364
pragma
Singleton
import
QtQuick
2.7
import
Common
1.0
// ===================================================================
QtObject
{
property
int
spacing
:
1
property
QtObject
entry
:
QtObject
{
property
int
leftMargin
:
4
property
int
rightMargin
:
4
property
color
color
:
Colors
.
i
property
QtObject
text
:
QtObject
{
property
color
color
:
Colors
.
k
property
int
fontSize
:
8
}
}
}
tests/ui/modules/Common/Styles/MenuStyle.qml
→
tests/ui/modules/Common/Styles/Menu
/Menu
Style.qml
View file @
51b82364
File moved
tests/ui/modules/Common/Styles/qmldir
View file @
51b82364
...
@@ -6,14 +6,12 @@ module Common.Styles
...
@@ -6,14 +6,12 @@ module Common.Styles
singleton CaterpillarAnimationStyle 1.0 Animations/CaterpillarAnimationStyle.qml
singleton CaterpillarAnimationStyle 1.0 Animations/CaterpillarAnimationStyle.qml
singleton CollapseStyle 1.0 CollapseStyle.qml
singleton CollapseStyle 1.0 CollapseStyle.qml
singleton DialogStyle 1.0 DialogStyle.qml
singleton DialogStyle 1.0 DialogStyle.qml
singleton DroppableTextAreaStyle 1.0 DroppableTextAreaStyle.qml
singleton DroppableTextAreaStyle 1.0 DroppableTextAreaStyle.qml
singleton ForceScrollBarStyle 1.0 ForceScrollBarStyle.qml
singleton ForceScrollBarStyle 1.0 ForceScrollBarStyle.qml
singleton MenuStyle 1.0 MenuStyle.qml
singleton PanedStyle 1.0 PanedStyle.qml
singleton PopupStyle 1.0 PopupStyle.qml
singleton SearchBoxStyle 1.0 SearchBoxStyle.qml
singleton AbstractTextButtonStyle 1.0 Form/AbstractTextButtonStyle.qml
singleton AbstractTextButtonStyle 1.0 Form/AbstractTextButtonStyle.qml
singleton ActionBarStyle 1.0 Form/ActionBarStyle.qml
singleton ActionBarStyle 1.0 Form/ActionBarStyle.qml
...
@@ -24,3 +22,12 @@ singleton SmallButtonStyle 1.0 Form/SmallButtonStyle.qml
...
@@ -24,3 +22,12 @@ singleton SmallButtonStyle 1.0 Form/SmallButtonStyle.qml
singleton TextButtonAStyle 1.0 Form/TextButtonAStyle.qml
singleton TextButtonAStyle 1.0 Form/TextButtonAStyle.qml
singleton TextButtonBStyle 1.0 Form/TextButtonBStyle.qml
singleton TextButtonBStyle 1.0 Form/TextButtonBStyle.qml
singleton TransparentComboBoxStyle 1.0 Form/TransparentComboBoxStyle.qml
singleton TransparentComboBoxStyle 1.0 Form/TransparentComboBoxStyle.qml
singleton ActionMenuStyle 1.0 Menu/ActionMenuStyle.qml
singleton MenuStyle 1.0 Menu/MenuStyle.qml
singleton PanedStyle 1.0 PanedStyle.qml
singleton PopupStyle 1.0 PopupStyle.qml
singleton SearchBoxStyle 1.0 SearchBoxStyle.qml
tests/ui/modules/Common/qmldir
View file @
51b82364
...
@@ -49,7 +49,8 @@ RoundedImage 1.0 Image/RoundedImage.qml
...
@@ -49,7 +49,8 @@ RoundedImage 1.0 Image/RoundedImage.qml
InvertedMouseArea 1.0 InvertedMouseArea.qml
InvertedMouseArea 1.0 InvertedMouseArea.qml
# Menu
# Menu
Menu 1.0 Menu.qml
ActionMenu 1.0 Menu/ActionMenu.qml
Menu 1.0 Menu/Menu.qml
# Paned
# Paned
Paned 1.0 Paned.qml
Paned 1.0 Paned.qml
...
...
tests/ui/modules/Linphone/Call/CallControls.qml
View file @
51b82364
...
@@ -52,32 +52,23 @@ RowLayout {
...
@@ -52,32 +52,23 @@ RowLayout {
DropDownMenu
{
DropDownMenu
{
id
:
menu
id
:
menu
implicitHeight
:
toto
.
height
launcher
:
button
launcher
:
button
relativeTo
:
button
relativeTo
:
button
relativeX
:
button
.
width
+
1
relativeX
:
button
.
width
+
1
width
:
120
implicitWidth
:
actionMenu
.
width
Menu
{
ActionMenu
{
id
:
toto
id
:
actionMenu
entryHeight
:
22
entryWidth
:
98
fontSize
:
11
entries
:
[{
entryName
:
qsTr
(
'
homeEntry
'
)
},
{
entryName
:
qsTr
(
'
contactsEntry
'
)
}]
onEntrySelected
:
{
entryHeight
:
22
console
.
log
(
'
entry
'
,
entry
)
entryWidth
:
120
entries
:
[
qsTr
(
'
acceptAudioCall
'
),
qsTr
(
'
acceptVideoCall
'
),
qsTr
(
'
hangup
'
)
]
if
(
entry
===
0
)
{
onClicked
:
console
.
log
(
'
entry
'
,
entry
)
setView
(
'
Home
'
)
}
else
if
(
entry
===
1
)
{
setView
(
'
Contacts
'
)
}
}
}
}
}
}
}
}
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