Browse Source

Large font for guided bar

Was too hard to click
QGC4.4
Don Gagne 9 years ago
parent
commit
ec1271c92a
  1. 9
      src/FlightDisplay/FlightDisplayViewWidgets.qml
  2. 6
      src/QmlControls/QGCButton.qml
  3. 5
      src/QmlControls/SliderSwitch.qml

9
src/FlightDisplay/FlightDisplayViewWidgets.qml

@ -442,27 +442,31 @@ Item { @@ -442,27 +442,31 @@ Item {
}
Row {
spacing: _margins
spacing: _margins * 2
QGCButton {
pointSize: ScreenTools.largeFontPointSize
text: (_activeVehicle && _activeVehicle.armed) ? (_activeVehicle.flying ? qsTr("Emergency Stop") : qsTr("Disarm")) : qsTr("Arm")
visible: _activeVehicle
onClicked: _guidedModeBar.confirmAction(_activeVehicle.armed ? (_activeVehicle.flying ? _guidedModeBar.confirmEmergencyStop : _guidedModeBar.confirmDisarm) : _guidedModeBar.confirmArm)
}
QGCButton {
pointSize: ScreenTools.largeFontPointSize
text: qsTr("RTL")
visible: (_activeVehicle && _activeVehicle.armed) && _activeVehicle.guidedModeSupported && _activeVehicle.flying
onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmHome)
}
QGCButton {
pointSize: ScreenTools.largeFontPointSize
text: (_activeVehicle && _activeVehicle.flying) ? qsTr("Land"): qsTr("Takeoff")
visible: _activeVehicle && _activeVehicle.guidedModeSupported && _activeVehicle.armed
onClicked: _guidedModeBar.confirmAction(_activeVehicle.flying ? _guidedModeBar.confirmLand : _guidedModeBar.confirmTakeoff)
}
QGCButton {
pointSize: ScreenTools.largeFontPointSize
text: qsTr("Pause")
visible: (_activeVehicle && _activeVehicle.armed) && _activeVehicle.pauseVehicleSupported && _activeVehicle.flying
onClicked: {
@ -472,6 +476,7 @@ Item { @@ -472,6 +476,7 @@ Item {
}
QGCButton {
pointSize: ScreenTools.largeFontPointSize
text: qsTr("Change Altitude")
visible: (_activeVehicle && _activeVehicle.flying) && _activeVehicle.guidedModeSupported && _activeVehicle.armed
onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmChangeAlt)
@ -492,7 +497,7 @@ Item { @@ -492,7 +497,7 @@ Item {
anchors.bottomMargin: _margins
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
height: ScreenTools.defaultFontPixelHeight * 3
height: _guidedModeBar.height
visible: false
z: QGroundControl.zOrderWidgets

6
src/QmlControls/QGCButton.qml

@ -7,8 +7,8 @@ import QGroundControl.Palette 1.0 @@ -7,8 +7,8 @@ import QGroundControl.Palette 1.0
import QGroundControl.ScreenTools 1.0
Button {
property bool primary: false ///< primary button for a group of buttons
property bool primary: false ///< primary button for a group of buttons
property real pointSize: ScreenTools.defaultFontPointSize ///< Point size for button text
property var _qgcPal: QGCPalette { colorGroupEnabled: enabled }
property bool _showHighlight: (pressed | hovered | checked) && !__forceHoverOff
@ -102,7 +102,7 @@ Button { @@ -102,7 +102,7 @@ Button {
id: text
antialiasing: true
text: control.text
font.pointSize: ScreenTools.defaultFontPointSize
font.pointSize: pointSize
font.family: ScreenTools.normalFontFamily
anchors.verticalCenter: parent.verticalCenter
color: _showHighlight ?

5
src/QmlControls/SliderSwitch.qml

@ -23,10 +23,11 @@ Rectangle { @@ -23,10 +23,11 @@ Rectangle {
QGCPalette { id: qgcPal; colorGroupEnabled: true }
QGCLabel {
id: label
id: label
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: qsTr("Slide to %1").arg(confirmText)
font.pointSize: ScreenTools.largeFontPointSize
text: qsTr("Slide to %1").arg(confirmText)
}
Rectangle {

Loading…
Cancel
Save