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
d0512114
Commit
d0512114
authored
May 15, 2015
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1577 from DonLakeFlyer/Animation
Animate QGCView dialog
parents
87ce12df
85f168cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
5 deletions
+59
-5
QGCView.qml
src/QmlControls/QGCView.qml
+59
-5
No files found.
src/QmlControls/QGCView.qml
View file @
d0512114
...
...
@@ -115,6 +115,8 @@ FactPanel {
__dialogComponent
=
component
__viewPanel
.
enabled
=
false
__dialogOverlay
.
visible
=
true
__animateShowDialog
.
start
()
}
function
showMessage
(
title
,
message
,
buttons
)
{
...
...
@@ -127,12 +129,13 @@ FactPanel {
__dialogComponent
=
__messageDialog
__viewPanel
.
enabled
=
false
__dialogOverlay
.
visible
=
true
__animateShowDialog
.
start
()
}
function
hideDialog
()
{
__dialogComponent
=
null
__viewPanel
.
enabled
=
true
__
dialogOverlay
.
visible
=
false
__
animateHideDialog
.
start
()
}
QGCPalette
{
id
:
__qgcPal
;
colorGroupEnabled
:
true
}
...
...
@@ -180,13 +183,64 @@ FactPanel {
anchors.fill
:
parent
z
:
5000
readonly
property
int
__animationDuration
:
200
ParallelAnimation
{
id
:
__animateShowDialog
NumberAnimation
{
target
:
__transparentSection
properties
:
"
opacity
"
from
:
0.0
to
:
0.8
duration
:
__dialogOverlay
.
__animationDuration
}
NumberAnimation
{
target
:
__transparentSection
properties
:
"
width
"
from
:
__dialogOverlay
.
width
to
:
__dialogOverlay
.
width
-
__dialogPanel
.
width
duration
:
__dialogOverlay
.
__animationDuration
}
}
ParallelAnimation
{
id
:
__animateHideDialog
NumberAnimation
{
target
:
__transparentSection
properties
:
"
opacity
"
from
:
0.8
to
:
0.0
duration
:
__dialogOverlay
.
__animationDuration
}
NumberAnimation
{
target
:
__transparentSection
properties
:
"
width
"
from
:
__dialogOverlay
.
width
-
__dialogPanel
.
width
to
:
__dialogOverlay
.
width
duration
:
__dialogOverlay
.
__animationDuration
}
onRunningChanged
:
{
if
(
!
running
)
{
__dialogComponent
=
null
__dialogOverlay
.
visible
=
false
}
}
}
// This covers the parent with an transparent section
Rectangle
{
id
:
__transparentSection
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
__dialogPanel
.
left
opacity
:
0.
8
0
width
:
parent
.
width
opacity
:
0.0
color
:
__qgcPal
.
window
}
...
...
@@ -195,7 +249,7 @@ FactPanel {
id
:
__dialogPanel
width
:
__dialogCharWidth
==
-
1
?
parent
.
width
:
__textWidth
*
__dialogCharWidth
height
:
parent
.
height
anchors.
right
:
parent
.
right
anchors.
left
:
__transparentSection
.
right
color
:
__qgcPal
.
windowShadeDark
Rectangle
{
...
...
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