Commit d8faf3ac authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #3546 from DonLakeFlyer/GuidedBarFont

Guider bar font sizing changes
parents e562f417 a73ba2f2
...@@ -284,6 +284,8 @@ Item { ...@@ -284,6 +284,8 @@ Item {
z: QGroundControl.zOrderWidgets z: QGroundControl.zOrderWidgets
state: "Shown" state: "Shown"
property real _fontPointSize: ScreenTools.isMobile ? ScreenTools.largeFontPointSize : ScreenTools.defaultFontPointSize
states: [ states: [
State { State {
name: "Shown" name: "Shown"
...@@ -448,28 +450,28 @@ Item { ...@@ -448,28 +450,28 @@ Item {
spacing: _margins * 2 spacing: _margins * 2
QGCButton { QGCButton {
pointSize: ScreenTools.largeFontPointSize pointSize: _guidedModeBar._fontPointSize
text: (_activeVehicle && _activeVehicle.armed) ? (_activeVehicle.flying ? qsTr("Emergency Stop") : qsTr("Disarm")) : qsTr("Arm") text: (_activeVehicle && _activeVehicle.armed) ? (_activeVehicle.flying ? qsTr("Emergency Stop") : qsTr("Disarm")) : qsTr("Arm")
visible: _activeVehicle visible: _activeVehicle
onClicked: _guidedModeBar.confirmAction(_activeVehicle.armed ? (_activeVehicle.flying ? _guidedModeBar.confirmEmergencyStop : _guidedModeBar.confirmDisarm) : _guidedModeBar.confirmArm) onClicked: _guidedModeBar.confirmAction(_activeVehicle.armed ? (_activeVehicle.flying ? _guidedModeBar.confirmEmergencyStop : _guidedModeBar.confirmDisarm) : _guidedModeBar.confirmArm)
} }
QGCButton { QGCButton {
pointSize: ScreenTools.largeFontPointSize pointSize: _guidedModeBar._fontPointSize
text: qsTr("RTL") text: qsTr("RTL")
visible: (_activeVehicle && _activeVehicle.armed) && _activeVehicle.guidedModeSupported && _activeVehicle.flying visible: (_activeVehicle && _activeVehicle.armed) && _activeVehicle.guidedModeSupported && _activeVehicle.flying
onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmHome) onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmHome)
} }
QGCButton { QGCButton {
pointSize: ScreenTools.largeFontPointSize pointSize: _guidedModeBar._fontPointSize
text: (_activeVehicle && _activeVehicle.flying) ? qsTr("Land"): qsTr("Takeoff") text: (_activeVehicle && _activeVehicle.flying) ? qsTr("Land"): qsTr("Takeoff")
visible: _activeVehicle && _activeVehicle.guidedModeSupported && _activeVehicle.armed visible: _activeVehicle && _activeVehicle.guidedModeSupported && _activeVehicle.armed
onClicked: _guidedModeBar.confirmAction(_activeVehicle.flying ? _guidedModeBar.confirmLand : _guidedModeBar.confirmTakeoff) onClicked: _guidedModeBar.confirmAction(_activeVehicle.flying ? _guidedModeBar.confirmLand : _guidedModeBar.confirmTakeoff)
} }
QGCButton { QGCButton {
pointSize: ScreenTools.largeFontPointSize pointSize: _guidedModeBar._fontPointSize
text: qsTr("Pause") text: qsTr("Pause")
visible: (_activeVehicle && _activeVehicle.armed) && _activeVehicle.pauseVehicleSupported && _activeVehicle.flying visible: (_activeVehicle && _activeVehicle.armed) && _activeVehicle.pauseVehicleSupported && _activeVehicle.flying
onClicked: { onClicked: {
...@@ -479,7 +481,7 @@ Item { ...@@ -479,7 +481,7 @@ Item {
} }
QGCButton { QGCButton {
pointSize: ScreenTools.largeFontPointSize pointSize: _guidedModeBar._fontPointSize
text: qsTr("Change Altitude") text: qsTr("Change Altitude")
visible: (_activeVehicle && _activeVehicle.flying) && _activeVehicle.guidedModeSupported && _activeVehicle.armed visible: (_activeVehicle && _activeVehicle.flying) && _activeVehicle.guidedModeSupported && _activeVehicle.armed
onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmChangeAlt) onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmChangeAlt)
...@@ -503,6 +505,7 @@ Item { ...@@ -503,6 +505,7 @@ Item {
height: _guidedModeBar.height height: _guidedModeBar.height
visible: false visible: false
z: QGroundControl.zOrderWidgets z: QGroundControl.zOrderWidgets
fontPointSize: _guidedModeBar._fontPointSize
onAccept: { onAccept: {
guidedModeConfirm.visible = false guidedModeConfirm.visible = false
......
...@@ -16,6 +16,7 @@ Rectangle { ...@@ -16,6 +16,7 @@ Rectangle {
signal reject ///< Action rejected signal reject ///< Action rejected
property string confirmText ///< Text for slider property string confirmText ///< Text for slider
property alias fontPointSize: label.font.pointSize ///< Point size for text
property real _border: 4 property real _border: 4
property real _diameter: height - (_border * 2) property real _diameter: height - (_border * 2)
...@@ -26,7 +27,6 @@ Rectangle { ...@@ -26,7 +27,6 @@ Rectangle {
id: label id: label
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
font.pointSize: ScreenTools.largeFontPointSize
text: qsTr("Slide to %1").arg(confirmText) text: qsTr("Slide to %1").arg(confirmText)
} }
...@@ -48,6 +48,8 @@ Rectangle { ...@@ -48,6 +48,8 @@ Rectangle {
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
smooth: false smooth: false
mipmap: false mipmap: false
color: qgcPal.text color: qgcPal.text
cache: false cache: false
source: "/res/ArrowRight.svg" source: "/res/ArrowRight.svg"
......
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