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
35d09c3c
Unverified
Commit
35d09c3c
authored
Jun 25, 2018
by
Don Gagne
Committed by
GitHub
Jun 25, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6653 from DonLakeFlyer/CompassOutdoor
Make compass more visible in Outdoor theme
parents
a9152774
d935d5c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
15 deletions
+24
-15
QGCAttitudeWidget.qml
src/FlightMap/Widgets/QGCAttitudeWidget.qml
+5
-2
QGCCompassWidget.qml
src/FlightMap/Widgets/QGCCompassWidget.qml
+19
-13
No files found.
src/FlightMap/Widgets/QGCAttitudeWidget.qml
View file @
35d09c3c
...
@@ -20,6 +20,7 @@ import QtGraphicalEffects 1.0
...
@@ -20,6 +20,7 @@ import QtGraphicalEffects 1.0
import
QGroundControl
1.0
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Palette
1.0
Item
{
Item
{
id
:
root
id
:
root
...
@@ -35,6 +36,8 @@ Item {
...
@@ -35,6 +36,8 @@ Item {
width
:
size
width
:
size
height
:
size
height
:
size
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
Item
{
Item
{
id
:
instrument
id
:
instrument
anchors.fill
:
parent
anchors.fill
:
parent
...
@@ -115,8 +118,8 @@ Item {
...
@@ -115,8 +118,8 @@ Item {
anchors.fill
:
parent
anchors.fill
:
parent
radius
:
width
/
2
radius
:
width
/
2
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
border.color
:
"
black
"
border.color
:
qgcPal
.
text
border.width
:
2
border.width
:
1
}
}
QGCLabel
{
QGCLabel
{
...
...
src/FlightMap/Widgets/QGCCompassWidget.qml
View file @
35d09c3c
...
@@ -20,9 +20,12 @@ import QtGraphicalEffects 1.0
...
@@ -20,9 +20,12 @@ import QtGraphicalEffects 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
Palette
1.0
Item
{
Item
{
id
:
root
id
:
root
width
:
size
height
:
size
property
real
size
:
_defaultSize
property
real
size
:
_defaultSize
property
var
vehicle
:
null
property
var
vehicle
:
null
...
@@ -32,14 +35,15 @@ Item {
...
@@ -32,14 +35,15 @@ Item {
property
int
_fontSize
:
ScreenTools
.
defaultFontPointSize
*
_sizeRatio
property
int
_fontSize
:
ScreenTools
.
defaultFontPointSize
*
_sizeRatio
property
real
_heading
:
vehicle
?
vehicle
.
heading
.
rawValue
:
0
property
real
_heading
:
vehicle
?
vehicle
.
heading
.
rawValue
:
0
width
:
size
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
height
:
size
Rectangle
{
Rectangle
{
id
:
borderRect
id
:
borderRect
anchors.fill
:
parent
anchors.fill
:
parent
radius
:
width
/
2
radius
:
width
/
2
color
:
"
black
"
color
:
qgcPal
.
window
border.color
:
qgcPal
.
text
border.width
:
1
}
}
Item
{
Item
{
...
@@ -49,9 +53,9 @@ Item {
...
@@ -49,9 +53,9 @@ Item {
Image
{
Image
{
id
:
pointer
id
:
pointer
width
:
size
*
0.65
source
:
vehicle
?
vehicle
.
vehicleImageCompass
:
""
source
:
vehicle
?
vehicle
.
vehicleImageCompass
:
""
mipmap
:
true
mipmap
:
true
width
:
size
*
0.65
sourceSize.width
:
width
sourceSize.width
:
width
fillMode
:
Image
.
PreserveAspectFit
fillMode
:
Image
.
PreserveAspectFit
anchors.centerIn
:
parent
anchors.centerIn
:
parent
...
@@ -62,28 +66,30 @@ Item {
...
@@ -62,28 +66,30 @@ Item {
}
}
}
}
Image
{
QGCColored
Image
{
id
:
compassDial
id
:
compassDial
source
:
"
/qmlimages/compassInstrumentDial.svg
"
source
:
"
/qmlimages/compassInstrumentDial.svg
"
mipmap
:
true
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
fillMode
:
Image
.
PreserveAspectFit
anchors.fill
:
parent
anchors.fill
:
parent
sourceSize.height
:
parent
.
height
sourceSize.height
:
parent
.
height
color
:
qgcPal
.
text
}
}
Rectangle
{
Rectangle
{
anchors.centerIn
:
parent
anchors.centerIn
:
parent
width
:
size
*
0.35
width
:
size
*
0.35
height
:
size
*
0.2
height
:
size
*
0.2
border.color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.15
)
border.color
:
qgcPal
.
text
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.65
)
color
:
qgcPal
.
window
opacity
:
0.65
QGCLabel
{
QGCLabel
{
text
:
_headingString3
text
:
_headingString3
font.family
:
vehicle
?
ScreenTools
.
demiboldFontFamily
:
ScreenTools
.
normalFontFamily
font.family
:
vehicle
?
ScreenTools
.
demiboldFontFamily
:
ScreenTools
.
normalFontFamily
font.pointSize
:
_fontSize
<
8
?
8
:
_fontSize
;
font.pointSize
:
_fontSize
<
8
?
8
:
_fontSize
;
color
:
"
white
"
color
:
qgcPal
.
text
anchors.centerIn
:
parent
anchors.centerIn
:
parent
property
string
_headingString
:
vehicle
?
_heading
.
toFixed
(
0
)
:
"
OFF
"
property
string
_headingString
:
vehicle
?
_heading
.
toFixed
(
0
)
:
"
OFF
"
property
string
_headingString2
:
_headingString
.
length
===
1
?
"
0
"
+
_headingString
:
_headingString
property
string
_headingString2
:
_headingString
.
length
===
1
?
"
0
"
+
_headingString
:
_headingString
...
...
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