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
f3a77dbb
Commit
f3a77dbb
authored
Mar 06, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better variable names
Also realized I don’t need __lastMouseXY
parent
9f4b6e76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
QGCButton.qml
src/QmlControls/QGCButton.qml
+8
-10
No files found.
src/QmlControls/QGCButton.qml
View file @
f3a77dbb
...
@@ -20,22 +20,20 @@ Button {
...
@@ -20,22 +20,20 @@ Button {
property
bool
__forceHoverOff
:
false
property
bool
__forceHoverOff
:
false
property
int
__lastMouseX
:
__behavior
.
mouseX
property
int
__lastGlobalMouseX
:
0
property
int
__lastMouseY
:
__behavior
.
mouseY
property
int
__lastGlobalMouseY
:
0
property
int
__lastCursorX
:
0
property
int
__lastCursorY
:
0
property
MousePosition
__
m
ousePosition
:
MousePosition
{
}
property
MousePosition
__
globalM
ousePosition
:
MousePosition
{
}
Connections
{
Connections
{
target
:
__behavior
target
:
__behavior
onMouseXChanged
:
{
onMouseXChanged
:
{
__last
CursorX
=
__m
ousePosition
.
mouseX
__last
GlobalMouseX
=
__globalM
ousePosition
.
mouseX
__last
CursorY
=
__m
ousePosition
.
mouseY
__last
GlobalMouseY
=
__globalM
ousePosition
.
mouseY
}
}
onMouseYChanged
:
{
onMouseYChanged
:
{
__last
CursorX
=
__m
ousePosition
.
mouseX
__last
GlobalMouseX
=
__globalM
ousePosition
.
mouseX
__last
CursorY
=
__m
ousePosition
.
mouseY
__last
GlobalMouseY
=
__globalM
ousePosition
.
mouseY
}
}
onEntered
:
{
__forceHoverOff
;
false
;
hoverTimer
.
start
()
}
onEntered
:
{
__forceHoverOff
;
false
;
hoverTimer
.
start
()
}
onExited
:
{
__forceHoverOff
;
false
;
hoverTimer
.
stop
()
}
onExited
:
{
__forceHoverOff
;
false
;
hoverTimer
.
stop
()
}
...
@@ -47,7 +45,7 @@ Button {
...
@@ -47,7 +45,7 @@ Button {
repeat
:
true
repeat
:
true
onTriggered
:
{
onTriggered
:
{
if
(
__last
CursorX
!=
__mousePosition
.
mouseX
||
__lastCursorY
!=
__m
ousePosition
.
mouseY
)
{
if
(
__last
GlobalMouseX
!=
__globalMousePosition
.
mouseX
||
__lastGlobalMouseY
!=
__globalM
ousePosition
.
mouseY
)
{
__forceHoverOff
=
true
__forceHoverOff
=
true
}
else
{
}
else
{
__forceHoverOff
=
false
__forceHoverOff
=
false
...
...
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