4import QGroundControl.Controls
8 anchors.centerIn: parent
9 width: compassSize * 1/3
12 property real compassSize
14 property bool simplified: false
16 property var _qgcPal: QGroundControl.globalPalette
20 function onGlobalThemeChanged() { control.requestPaint() }
24 var ctx = getContext("2d")
25 ctx.strokeStyle = simplified ? "#EE3424" : _qgcPal.text
26 ctx.fillStyle = "#EE3424"
29 ctx.moveTo(width / 2, 0)
30 ctx.lineTo(width, height)
31 ctx.lineTo(width / 2, height * 0.75)
32 ctx.lineTo(width / 2, 0)
35 ctx.fillStyle = "#C72B27"
37 ctx.moveTo(width / 2, 0)
39 ctx.lineTo(width / 2, height * 0.75)
40 ctx.lineTo(width / 2, 0)
46 origin.x: control.width / 2
47 origin.y: control.height / 2