Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
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
Valentin Platzgummer
qgroundcontrol
Commits
58572f4d
Commit
58572f4d
authored
Feb 27, 2017
by
Don Gagne
Committed by
GitHub
Feb 27, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4649 from DonLakeFlyer/DropPanelCancel
Modified DropPanel cancel MouseArea creation
parents
5c0dfa95
02980062
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
DropPanel.qml
src/QmlControls/DropPanel.qml
+16
-0
ToolStrip.qml
src/QmlControls/ToolStrip.qml
+0
-10
No files found.
src/QmlControls/DropPanel.qml
View file @
58572f4d
...
...
@@ -47,6 +47,7 @@ Item {
property
alias
_dropDownComponent
:
dropDownLoader
.
sourceComponent
property
real
_viewportMaxTop
:
0
property
real
_viewportMaxBottom
:
parent
.
parent
.
height
-
parent
.
y
property
var
_dropPanelCancel
function
show
(
panelEdgeTopPoint
,
panelEdgeHeight
,
panelComponent
)
{
_dropEdgeTopPoint
=
panelEdgeTopPoint
...
...
@@ -54,9 +55,13 @@ Item {
_dropDownComponent
=
panelComponent
_calcPositions
()
visible
=
true
_dropPanelCancel
=
dropPanelCancelComponent
.
createObject
(
toolStrip
.
parent
)
}
function
hide
()
{
if
(
_dropPanelCancel
)
{
_dropPanelCancel
.
destroy
()
}
if
(
visible
)
{
visible
=
false
_dropDownComponent
=
undefined
...
...
@@ -101,6 +106,17 @@ Item {
QGCPalette
{
id
:
qgcPal
}
Component
{
// Overlay which is used to cancel the panel when the user clicks away
id
:
dropPanelCancelComponent
MouseArea
{
anchors.fill
:
parent
z
:
toolStrip
.
z
-
1
onClicked
:
dropPanel
.
hide
()
}
}
Item
{
id
:
dropDownItem
...
...
src/QmlControls/ToolStrip.qml
View file @
58572f4d
...
...
@@ -47,16 +47,6 @@ Rectangle {
}
}
MouseArea
{
x
:
-
_root
.
x
y
:
-
_root
.
y
width
:
_root
.
parent
.
width
height
:
_root
.
parent
.
height
visible
:
dropPanel
.
visible
onClicked
:
dropPanel
.
hide
()
preventStealing
:
true
}
Column
{
id
:
buttonStripColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
...
...
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