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
72d33df1
Commit
72d33df1
authored
May 16, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui): remove `DropDownMenu` component, create a `Popup` component instead
parent
f6f32adf
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
18 deletions
+86
-18
resources.qrc
linphone-desktop/resources.qrc
+1
-1
DropDownMenu.qml
linphone-desktop/ui/modules/Common/Popup/DropDownMenu.qml
+0
-11
Popup.qml
linphone-desktop/ui/modules/Common/Popup/Popup.qml
+80
-0
qmldir
linphone-desktop/ui/modules/Common/qmldir
+1
-1
Calls.qml
linphone-desktop/ui/modules/Linphone/Calls/Calls.qml
+4
-5
No files found.
linphone-desktop/resources.qrc
View file @
72d33df1
...
@@ -231,7 +231,7 @@
...
@@ -231,7 +231,7 @@
<file>
ui/modules/Common/Popup/AbstractDropDownMenu.qml
</file>
<file>
ui/modules/Common/Popup/AbstractDropDownMenu.qml
</file>
<file>
ui/modules/Common/Popup/DesktopPopup.qml
</file>
<file>
ui/modules/Common/Popup/DesktopPopup.qml
</file>
<file>
ui/modules/Common/Popup/DropDownDynamicMenu.qml
</file>
<file>
ui/modules/Common/Popup/DropDownDynamicMenu.qml
</file>
<file>
ui/modules/Common/Popup/
DropDownMenu
.qml
</file>
<file>
ui/modules/Common/Popup/
Popup
.qml
</file>
<file>
ui/modules/Common/Popup/PopupShadow.qml
</file>
<file>
ui/modules/Common/Popup/PopupShadow.qml
</file>
<file>
ui/modules/Common/qmldir
</file>
<file>
ui/modules/Common/qmldir
</file>
<file>
ui/modules/Common/Styles/Animations/BusyIndicatorStyle.qml
</file>
<file>
ui/modules/Common/Styles/Animations/BusyIndicatorStyle.qml
</file>
...
...
linphone-desktop/ui/modules/Common/Popup/DropDownMenu.qml
deleted
100644 → 0
View file @
f6f32adf
import
Utils
1.0
// =============================================================================
// Menu which supports menu like `ActionMenu` or `Menu`.
// =============================================================================
AbstractDropDownMenu
{
function
_computeHeight
()
{
return
_content
[
0
].
height
}
}
linphone-desktop/ui/modules/Common/Popup/Popup.qml
0 → 100644
View file @
72d33df1
import
QtQuick
2.7
import
QtQuick
.
Controls
2.1
as
Controls
import
Utils
1.0
// =============================================================================
Item
{
// Optionnal parameters, set the position of popup relative to this item.
property
var
relativeTo
property
int
relativeX
:
0
property
int
relativeY
:
0
default
property
alias
_content
:
popup
.
contentItem
// ---------------------------------------------------------------------------
visible
:
false
function
show
()
{
if
(
popup
.
visible
)
{
return
}
if
(
relativeTo
)
{
var
parent
=
Utils
.
getTopParent
(
this
)
popup
.
x
=
Qt
.
binding
(
function
()
{
return
relativeTo
?
relativeTo
.
mapToItem
(
null
,
relativeX
,
relativeY
).
x
:
0
})
popup
.
y
=
Qt
.
binding
(
function
()
{
return
relativeTo
?
relativeTo
.
mapToItem
(
null
,
relativeX
,
relativeY
).
y
:
0
})
}
else
{
popup
.
x
=
Qt
.
binding
(
function
()
{
return
x
})
popup
.
y
=
Qt
.
binding
(
function
()
{
return
y
})
}
popup
.
open
()
}
function
hide
()
{
if
(
!
popup
.
visible
)
{
return
}
popup
.
x
=
0
popup
.
y
=
0
popup
.
close
()
}
// ---------------------------------------------------------------------------
Controls.Popup
{
id
:
popup
background
:
Rectangle
{
height
:
popup
.
height
width
:
popup
.
width
layer
{
enabled
:
true
effect
:
PopupShadow
{}
}
}
contentItem
:
Column
{
id
:
internalData
}
padding
:
0
Component.onCompleted
:
parent
=
Utils
.
getTopParent
(
this
)
}
}
linphone-desktop/ui/modules/Common/qmldir
View file @
72d33df1
...
@@ -73,7 +73,7 @@ Paned 1.0 Misc/Paned.qml
...
@@ -73,7 +73,7 @@ Paned 1.0 Misc/Paned.qml
AbstractDropDownMenu 1.0 Popup/AbstractDropDownMenu.qml
AbstractDropDownMenu 1.0 Popup/AbstractDropDownMenu.qml
DesktopPopup 1.0 Popup/DesktopPopup.qml
DesktopPopup 1.0 Popup/DesktopPopup.qml
DropDownDynamicMenu 1.0 Popup/DropDownDynamicMenu.qml
DropDownDynamicMenu 1.0 Popup/DropDownDynamicMenu.qml
DropDownMenu 1.0 Popup/DropDownMenu
.qml
Popup 1.0 Popup/Popup
.qml
PopupShadow 1.0 Popup/PopupShadow.qml
PopupShadow 1.0 Popup/PopupShadow.qml
TooltipArea 1.0 Tooltip/TooltipArea.qml
TooltipArea 1.0 Tooltip/TooltipArea.qml
...
...
linphone-desktop/ui/modules/Linphone/Calls/Calls.qml
View file @
72d33df1
...
@@ -59,13 +59,12 @@ ListView {
...
@@ -59,13 +59,12 @@ ListView {
:
'
burger_menu
'
:
'
burger_menu
'
iconSize
:
CallsStyle
.
entry
.
iconMenuSize
iconSize
:
CallsStyle
.
entry
.
iconMenuSize
onClicked
:
menu
.
showMenu
()
onClicked
:
popup
.
show
()
DropDownMenu
{
Popup
{
id
:
menu
id
:
popup
implicitWidth
:
actionMenu
.
width
implicitWidth
:
actionMenu
.
width
launcher
:
button
relativeTo
:
callControls
relativeTo
:
callControls
relativeX
:
callControls
.
width
relativeX
:
callControls
.
width
...
@@ -82,7 +81,7 @@ ListView {
...
@@ -82,7 +81,7 @@ ListView {
entryName
:
modelData
.
name
entryName
:
modelData
.
name
onClicked
:
{
onClicked
:
{
menu
.
hideMenu
()
popup
.
hide
()
params
.
actions
[
index
].
handler
()
params
.
actions
[
index
].
handler
()
}
}
}
}
...
...
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