Commit 187b860f authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #4068 from DonLakeFlyer/JoystickColor

Fix joystick coloring
parents 0bc63269 55696a58
...@@ -245,6 +245,8 @@ QGCView { ...@@ -245,6 +245,8 @@ QGCView {
anchors.horizontalCenter: widgetsLoader.horizontalCenter anchors.horizontalCenter: widgetsLoader.horizontalCenter
source: "qrc:/qml/VirtualJoystick.qml" source: "qrc:/qml/VirtualJoystick.qml"
active: QGroundControl.virtualTabletJoystick active: QGroundControl.virtualTabletJoystick
property bool useLightColors: root.isBackgroundDark
} }
} }
} }
...@@ -17,7 +17,7 @@ import QGroundControl.Palette 1.0 ...@@ -17,7 +17,7 @@ import QGroundControl.Palette 1.0
import QGroundControl.Vehicle 1.0 import QGroundControl.Vehicle 1.0
Item { Item {
QGCMapPalette { id: mapPal; lightColors: !isBackgroundDark } //property bool useLightColors - Must be passed in from loaded
Timer { Timer {
interval: 40 // 25Hz, same as real joystick rate interval: 40 // 25Hz, same as real joystick rate
...@@ -39,7 +39,7 @@ Item { ...@@ -39,7 +39,7 @@ Item {
width: parent.height width: parent.height
height: parent.height height: parent.height
yAxisThrottle: true yAxisThrottle: true
lightColors: !isBackgroundDark lightColors: useLightColors
} }
JoystickThumbPad { JoystickThumbPad {
...@@ -50,6 +50,6 @@ Item { ...@@ -50,6 +50,6 @@ Item {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
width: parent.height width: parent.height
height: parent.height height: parent.height
lightColors: !isBackgroundDark lightColors: useLightColors
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment