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
7e5b45a9
Commit
7e5b45a9
authored
Apr 27, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indicator dropdowns x position on screen
parent
1e54c4ba
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
19 deletions
+17
-19
MainRootWindow.qml
src/ui/MainRootWindow.qml
+5
-5
BatteryIndicator.qml
src/ui/toolbar/BatteryIndicator.qml
+2
-2
GPSIndicator.qml
src/ui/toolbar/GPSIndicator.qml
+2
-3
GPSRTKIndicator.qml
src/ui/toolbar/GPSRTKIndicator.qml
+2
-3
JoystickIndicator.qml
src/ui/toolbar/JoystickIndicator.qml
+2
-2
RCRSSIIndicator.qml
src/ui/toolbar/RCRSSIIndicator.qml
+2
-2
TelemetryRSSIIndicator.qml
src/ui/toolbar/TelemetryRSSIIndicator.qml
+2
-2
No files found.
src/ui/MainRootWindow.qml
View file @
7e5b45a9
...
...
@@ -555,9 +555,9 @@ ApplicationWindow {
//-------------------------------------------------------------------------
//-- Indicator Popups
function
showPopUp
(
dropItem
,
centerX
)
{
indicatorDropdown
.
centerX
=
centerX
function
showPopUp
(
item
,
dropItem
)
{
indicatorDropdown
.
currentIndicator
=
dropItem
indicatorDropdown
.
currentItem
=
item
indicatorDropdown
.
open
()
}
...
...
@@ -567,8 +567,8 @@ ApplicationWindow {
modal
:
true
focus
:
true
closePolicy
:
Popup
.
CloseOnEscape
|
Popup
.
CloseOnPressOutside
property
var
currentI
ndicator
:
null
property
real
centerX
:
0
property
var
currentI
tem
:
null
property
var
currentIndicator
:
null
background
:
Rectangle
{
width
:
loader
.
width
height
:
loader
.
height
...
...
@@ -577,7 +577,7 @@ ApplicationWindow {
Loader
{
id
:
loader
onLoaded
:
{
indicatorDropdown
.
x
=
ma
pFromGlobal
(
indicatorDropdown
.
centerX
,
0
).
x
indicatorDropdown
.
x
=
ma
inWindow
.
contentItem
.
mapFromItem
(
indicatorDropdown
.
currentItem
,
0
,
0
).
x
-
(
loader
.
width
*
0.5
)
}
}
onOpened
:
{
...
...
src/ui/toolbar/BatteryIndicator.qml
View file @
7e5b45a9
...
...
@@ -19,6 +19,7 @@ import QGroundControl.Palette 1.0
//-------------------------------------------------------------------------
//-- Battery Indicator
Item
{
id
:
_root
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
width
:
batteryIndicatorRow
.
width
...
...
@@ -117,8 +118,7 @@ Item {
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
var
centerX
=
mapToGlobal
(
x
+
(
width
/
2
),
0
).
x
mainWindow
.
showPopUp
(
batteryInfo
,
centerX
)
mainWindow
.
showPopUp
(
_root
,
batteryInfo
)
}
}
}
src/ui/toolbar/GPSIndicator.qml
View file @
7e5b45a9
...
...
@@ -19,7 +19,7 @@ import QGroundControl.Palette 1.0
//-------------------------------------------------------------------------
//-- GPS Indicator
Item
{
id
:
satelitte
id
:
_root
width
:
(
gpsValuesColumn
.
x
+
gpsValuesColumn
.
width
)
*
1.1
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
...
...
@@ -107,8 +107,7 @@ Item {
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
var
centerX
=
mapToGlobal
(
x
+
(
width
/
2
),
0
).
x
mainWindow
.
showPopUp
(
gpsInfo
,
centerX
)
mainWindow
.
showPopUp
(
_root
,
gpsInfo
)
}
}
}
src/ui/toolbar/GPSRTKIndicator.qml
View file @
7e5b45a9
...
...
@@ -18,7 +18,7 @@ import QGroundControl.Palette 1.0
//-------------------------------------------------------------------------
//-- GPS Indicator
Item
{
id
:
satelitte
id
:
_root
width
:
visible
?
(
gpsValuesColumn
.
x
+
gpsValuesColumn
.
width
)
*
1.1
:
0
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
...
...
@@ -108,8 +108,7 @@ Item {
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
var
centerX
=
mapToGlobal
(
x
+
(
width
/
2
),
0
).
x
mainWindow
.
showPopUp
(
gpsInfo
,
centerX
)
mainWindow
.
showPopUp
(
_root
,
gpsInfo
)
}
}
}
src/ui/toolbar/JoystickIndicator.qml
View file @
7e5b45a9
...
...
@@ -18,6 +18,7 @@ import QGroundControl.Palette 1.0
// Joystick Indicator
Item
{
id
:
_root
width
:
joystickRow
.
width
*
1.1
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
...
...
@@ -90,8 +91,7 @@ Item {
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
var
centerX
=
mapToGlobal
(
x
+
(
width
/
2
),
0
).
x
mainWindow
.
showPopUp
(
joystickInfo
,
centerX
)
mainWindow
.
showPopUp
(
_root
,
joystickInfo
)
}
}
}
src/ui/toolbar/RCRSSIIndicator.qml
View file @
7e5b45a9
...
...
@@ -19,6 +19,7 @@ import QGroundControl.Palette 1.0
//-------------------------------------------------------------------------
//-- RC RSSI Indicator
Item
{
id
:
_root
width
:
rssiRow
.
width
*
1.1
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
...
...
@@ -92,8 +93,7 @@ Item {
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
var
centerX
=
mapToGlobal
(
x
+
(
width
/
2
),
0
).
x
mainWindow
.
showPopUp
(
rcRSSIInfo
,
centerX
)
mainWindow
.
showPopUp
(
_root
,
rcRSSIInfo
)
}
}
}
src/ui/toolbar/TelemetryRSSIIndicator.qml
View file @
7e5b45a9
...
...
@@ -19,6 +19,7 @@ import QGroundControl.Palette 1.0
//-------------------------------------------------------------------------
//-- Telemetry RSSI
Item
{
id
:
_root
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
width
:
_hasTelemetry
?
telemIcon
.
width
*
1.1
:
0
...
...
@@ -83,8 +84,7 @@ Item {
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
var
centerX
=
mapToGlobal
(
x
+
(
width
/
2
),
0
).
x
mainWindow
.
showPopUp
(
telemRSSIInfo
,
centerX
)
mainWindow
.
showPopUp
(
_root
,
telemRSSIInfo
)
}
}
}
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