Browse Source

Fix joystick coloring

QGC4.4
Don Gagne 9 years ago
parent
commit
55696a5899
  1. 2
      src/FlightDisplay/FlightDisplayView.qml
  2. 6
      src/FlightDisplay/VirtualJoystick.qml

2
src/FlightDisplay/FlightDisplayView.qml

@ -245,6 +245,8 @@ QGCView { @@ -245,6 +245,8 @@ QGCView {
anchors.horizontalCenter: widgetsLoader.horizontalCenter
source: "qrc:/qml/VirtualJoystick.qml"
active: QGroundControl.virtualTabletJoystick
property bool useLightColors: root.isBackgroundDark
}
}
}

6
src/FlightDisplay/VirtualJoystick.qml

@ -17,7 +17,7 @@ import QGroundControl.Palette 1.0 @@ -17,7 +17,7 @@ import QGroundControl.Palette 1.0
import QGroundControl.Vehicle 1.0
Item {
QGCMapPalette { id: mapPal; lightColors: !isBackgroundDark }
//property bool useLightColors - Must be passed in from loaded
Timer {
interval: 40 // 25Hz, same as real joystick rate
@ -39,7 +39,7 @@ Item { @@ -39,7 +39,7 @@ Item {
width: parent.height
height: parent.height
yAxisThrottle: true
lightColors: !isBackgroundDark
lightColors: useLightColors
}
JoystickThumbPad {
@ -50,6 +50,6 @@ Item { @@ -50,6 +50,6 @@ Item {
anchors.bottom: parent.bottom
width: parent.height
height: parent.height
lightColors: !isBackgroundDark
lightColors: useLightColors
}
}

Loading…
Cancel
Save