Commit 0a5a5835 authored by dogmaphobic's avatar dogmaphobic

New, system wide font (OpenSans)

UI Tweaks for all mobile platforms.
parent a8cd4b51
android/res/drawable-hdpi/icon.png

20.5 KB | W: | H:

android/res/drawable-hdpi/icon.png

21.6 KB | W: | H:

android/res/drawable-hdpi/icon.png
android/res/drawable-hdpi/icon.png
android/res/drawable-hdpi/icon.png
android/res/drawable-hdpi/icon.png
  • 2-up
  • Swipe
  • Onion skin
android/res/drawable-ldpi/icon.png

19.2 KB | W: | H:

android/res/drawable-ldpi/icon.png

20 KB | W: | H:

android/res/drawable-ldpi/icon.png
android/res/drawable-ldpi/icon.png
android/res/drawable-ldpi/icon.png
android/res/drawable-ldpi/icon.png
  • 2-up
  • Swipe
  • Onion skin
android/res/drawable-mdpi/icon.png

19.2 KB | W: | H:

android/res/drawable-mdpi/icon.png

20 KB | W: | H:

android/res/drawable-mdpi/icon.png
android/res/drawable-mdpi/icon.png
android/res/drawable-mdpi/icon.png
android/res/drawable-mdpi/icon.png
  • 2-up
  • Swipe
  • Onion skin
android/res/drawable-xhdpi/icon.png

22 KB | W: | H:

android/res/drawable-xhdpi/icon.png

23.3 KB | W: | H:

android/res/drawable-xhdpi/icon.png
android/res/drawable-xhdpi/icon.png
android/res/drawable-xhdpi/icon.png
android/res/drawable-xhdpi/icon.png
  • 2-up
  • Swipe
  • Onion skin
android/res/drawable-xxhdpi/icon.png

25.2 KB | W: | H:

android/res/drawable-xxhdpi/icon.png

27 KB | W: | H:

android/res/drawable-xxhdpi/icon.png
android/res/drawable-xxhdpi/icon.png
android/res/drawable-xxhdpi/icon.png
android/res/drawable-xxhdpi/icon.png
  • 2-up
  • Swipe
  • Onion skin
android/res/drawable-xxxhdpi/icon.png

26.9 KB | W: | H:

android/res/drawable-xxxhdpi/icon.png

28.9 KB | W: | H:

android/res/drawable-xxxhdpi/icon.png
android/res/drawable-xxxhdpi/icon.png
android/res/drawable-xxxhdpi/icon.png
android/res/drawable-xxxhdpi/icon.png
  • 2-up
  • Swipe
  • Onion skin
<RCC> <RCC>
<qresource prefix="/fonts">
<file alias="opensans">resources/fonts/OpenSans-Regular.ttf</file>
<file alias="opensans-demibold">resources/fonts/OpenSans-Semibold.ttf</file>
</qresource>
<qresource prefix="/qmlimages"> <qresource prefix="/qmlimages">
<file alias="AirframeComponentIcon.png">src/AutoPilotPlugins/Common/Images/AirframeComponentIcon.png</file> <file alias="AirframeComponentIcon.png">src/AutoPilotPlugins/Common/Images/AirframeComponentIcon.png</file>
......
...@@ -211,7 +211,7 @@ QGCView { ...@@ -211,7 +211,7 @@ QGCView {
QGCLabel { QGCLabel {
id: directionLabel id: directionLabel
text: qsTr("Gimbal ") + directionTitle text: qsTr("Gimbal ") + directionTitle
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
...@@ -393,7 +393,7 @@ QGCView { ...@@ -393,7 +393,7 @@ QGCView {
QGCLabel { QGCLabel {
id: settingsLabel id: settingsLabel
text: qsTr("Gimbal Settings") text: qsTr("Gimbal Settings")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
......
...@@ -63,7 +63,7 @@ QGCView { ...@@ -63,7 +63,7 @@ QGCView {
QGCLabel { QGCLabel {
id: flightModeLabel id: flightModeLabel
text: qsTr("Flight Mode Settings") + (_fltmodeChExists ? "" : qsTr(" (Channel 5)")) text: qsTr("Flight Mode Settings") + (_fltmodeChExists ? "" : qsTr(" (Channel 5)"))
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
...@@ -141,7 +141,7 @@ QGCView { ...@@ -141,7 +141,7 @@ QGCView {
anchors.top: parent.top anchors.top: parent.top
anchors.left: flightModeSettings.right anchors.left: flightModeSettings.right
text: qsTr("Channel Options") text: qsTr("Channel Options")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
visible: _channelOptionCount != 0 visible: _channelOptionCount != 0
} }
......
...@@ -80,7 +80,7 @@ QGCView { ...@@ -80,7 +80,7 @@ QGCView {
QGCLabel { QGCLabel {
id: failsafeLabel id: failsafeLabel
text: qsTr("Failsafe Triggers") text: qsTr("Failsafe Triggers")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
...@@ -217,7 +217,7 @@ QGCView { ...@@ -217,7 +217,7 @@ QGCView {
anchors.left: failsafeSettings.right anchors.left: failsafeSettings.right
anchors.top: parent.top anchors.top: parent.top
text: qsTr("GeoFence") text: qsTr("GeoFence")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
...@@ -342,7 +342,7 @@ QGCView { ...@@ -342,7 +342,7 @@ QGCView {
anchors.topMargin: _margins anchors.topMargin: _margins
anchors.top: geoFenceSettings.bottom anchors.top: geoFenceSettings.bottom
text: qsTr("Return to Launch") text: qsTr("Return to Launch")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
...@@ -475,7 +475,7 @@ QGCView { ...@@ -475,7 +475,7 @@ QGCView {
anchors.left: parent.left anchors.left: parent.left
anchors.top: rtlSettings.bottom anchors.top: rtlSettings.bottom
text: qsTr("Arming Checks") text: qsTr("Arming Checks")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
......
...@@ -65,7 +65,7 @@ QGCView { ...@@ -65,7 +65,7 @@ QGCView {
QGCLabel { QGCLabel {
id: failsafeTriggersLabel id: failsafeTriggersLabel
text: qsTr("Failsafe Triggers") text: qsTr("Failsafe Triggers")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
...@@ -158,7 +158,7 @@ QGCView { ...@@ -158,7 +158,7 @@ QGCView {
anchors.leftMargin: _margins anchors.leftMargin: _margins
anchors.left: failsafeTriggerSettings.right anchors.left: failsafeTriggerSettings.right
text: qsTr("Return to Launch") text: qsTr("Return to Launch")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
......
...@@ -135,7 +135,7 @@ QGCView { ...@@ -135,7 +135,7 @@ QGCView {
QGCLabel { QGCLabel {
id: basicLabel id: basicLabel
text: qsTr("Basic Tuning") text: qsTr("Basic Tuning")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
...@@ -161,7 +161,7 @@ QGCView { ...@@ -161,7 +161,7 @@ QGCView {
QGCLabel { QGCLabel {
text: qsTr("Throttle Hover") text: qsTr("Throttle Hover")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
QGCLabel { QGCLabel {
...@@ -191,7 +191,7 @@ QGCView { ...@@ -191,7 +191,7 @@ QGCView {
QGCLabel { QGCLabel {
text: qsTr("Roll/Pitch Sensitivity") text: qsTr("Roll/Pitch Sensitivity")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
QGCLabel { QGCLabel {
...@@ -224,7 +224,7 @@ QGCView { ...@@ -224,7 +224,7 @@ QGCView {
QGCLabel { QGCLabel {
text: qsTr("Climb Sensitivity") text: qsTr("Climb Sensitivity")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
QGCLabel { QGCLabel {
...@@ -256,7 +256,7 @@ QGCView { ...@@ -256,7 +256,7 @@ QGCView {
QGCLabel { QGCLabel {
text: qsTr("RC Roll/Pitch Feel") text: qsTr("RC Roll/Pitch Feel")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
QGCLabel { QGCLabel {
...@@ -287,7 +287,7 @@ QGCView { ...@@ -287,7 +287,7 @@ QGCView {
anchors.topMargin: _margins anchors.topMargin: _margins
anchors.top: basicTuningRect.bottom anchors.top: basicTuningRect.bottom
text: qsTr("AutoTune") text: qsTr("AutoTune")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
......
...@@ -50,6 +50,7 @@ FactPanel { ...@@ -50,6 +50,7 @@ FactPanel {
labelText: qsTr("WiFi AP Password:") labelText: qsTr("WiFi AP Password:")
valueText: esp8266.wifiPassword valueText: esp8266.wifiPassword
} }
/* Too much info makes it all crammed
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("WiFi STA SSID:") labelText: qsTr("WiFi STA SSID:")
valueText: esp8266.wifiSSIDSta valueText: esp8266.wifiSSIDSta
...@@ -58,6 +59,7 @@ FactPanel { ...@@ -58,6 +59,7 @@ FactPanel {
labelText: qsTr("WiFi STA Password:") labelText: qsTr("WiFi STA Password:")
valueText: esp8266.wifiPasswordSta valueText: esp8266.wifiPasswordSta
} }
*/
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("UART Baud Rate:") labelText: qsTr("UART Baud Rate:")
valueText: uartBaud ? uartBaud.valueString : "" valueText: uartBaud ? uartBaud.valueString : ""
......
...@@ -130,7 +130,7 @@ QGCView { ...@@ -130,7 +130,7 @@ QGCView {
qsTr("You've connected a %1.").arg(controller.currentVehicleName) : qsTr("You've connected a %1.").arg(controller.currentVehicleName) :
qsTr("Airframe is not set.")) + qsTr("Airframe is not set.")) +
qsTr("To change this configuration, select the desired airframe below then click “Apply and Restart”.") qsTr("To change this configuration, select the desired airframe below then click “Apply and Restart”.")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
} }
......
...@@ -131,7 +131,7 @@ QGCView { ...@@ -131,7 +131,7 @@ QGCView {
*/ */
QGCLabel { QGCLabel {
text: qsTr("Camera Trigger Settings") text: qsTr("Camera Trigger Settings")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
id: camTrigRect id: camTrigRect
...@@ -213,7 +213,7 @@ QGCView { ...@@ -213,7 +213,7 @@ QGCView {
Item { width: 1; height: _margins * 0.5; } Item { width: 1; height: _margins * 0.5; }
QGCLabel { QGCLabel {
text: qsTr("Hardware Settings") text: qsTr("Hardware Settings")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
visible: _auxPins visible: _auxPins
} }
Rectangle { Rectangle {
......
...@@ -20,26 +20,21 @@ FactPanel { ...@@ -20,26 +20,21 @@ FactPanel {
property Fact _rcMapModeSw: controller.getParameterFact(-1, "RC_MAP_MODE_SW") property Fact _rcMapModeSw: controller.getParameterFact(-1, "RC_MAP_MODE_SW")
property bool _simpleMode: _rcMapFltmode.value > 0 || _rcMapModeSw.value == 0 property bool _simpleMode: _rcMapFltmode.value > 0 || _rcMapModeSw.value == 0
Loader { Loader {
anchors.fill: parent anchors.fill: parent
anchors.margins: 8
sourceComponent: _simpleMode ? simple : advanced sourceComponent: _simpleMode ? simple : advanced
} }
Component { Component {
id: simple id: simple
Column { Column {
anchors.margins: 8
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("Mode switch:") labelText: qsTr("Mode switch:")
valueText: _rcMapFltmode.value === 0 ? qsTr("Setup required") : _rcMapFltmode.enumStringValue valueText: _rcMapFltmode.value === 0 ? qsTr("Setup required") : _rcMapFltmode.enumStringValue
} }
Repeater { Repeater {
model: 6 model: 6
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("Flight Mode %1 :").arg(index + 1) labelText: qsTr("Flight Mode %1 :").arg(index + 1)
valueText: controller.getParameterFact(-1, "COM_FLTMODE" + (index + 1)).enumStringValue valueText: controller.getParameterFact(-1, "COM_FLTMODE" + (index + 1)).enumStringValue
...@@ -50,29 +45,22 @@ FactPanel { ...@@ -50,29 +45,22 @@ FactPanel {
Component { Component {
id: advanced id: advanced
Column { Column {
anchors.margins: 8
property Fact posCtlSwFact: controller.getParameterFact(-1, "RC_MAP_POSCTL_SW") property Fact posCtlSwFact: controller.getParameterFact(-1, "RC_MAP_POSCTL_SW")
property Fact loiterSwFact: controller.getParameterFact(-1, "RC_MAP_LOITER_SW") property Fact loiterSwFact: controller.getParameterFact(-1, "RC_MAP_LOITER_SW")
property Fact returnSwFact: controller.getParameterFact(-1, "RC_MAP_RETURN_SW") property Fact returnSwFact: controller.getParameterFact(-1, "RC_MAP_RETURN_SW")
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("Mode switch:") labelText: qsTr("Mode switch:")
valueText: _rcMapModeSw.value === 0 ? qsTr("Setup required") : _rcMapModeSw.valueString valueText: _rcMapModeSw.value === 0 ? qsTr("Setup required") : _rcMapModeSw.valueString
} }
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("Position Ctl switch:") labelText: qsTr("Position Ctl switch:")
valueText: posCtlSwFact.value === 0 ? qsTr("Disabled") : posCtlSwFact.valueString valueText: posCtlSwFact.value === 0 ? qsTr("Disabled") : posCtlSwFact.valueString
} }
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("Loiter switch:") labelText: qsTr("Loiter switch:")
valueText: loiterSwFact.value === 0 ? qsTr("Disabled") : loiterSwFact.valueString valueText: loiterSwFact.value === 0 ? qsTr("Disabled") : loiterSwFact.valueString
} }
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("Return switch:") labelText: qsTr("Return switch:")
valueText: returnSwFact.value === 0 ? qsTr("Disabled") : returnSwFact.valueString valueText: returnSwFact.value === 0 ? qsTr("Disabled") : returnSwFact.valueString
......
...@@ -71,7 +71,7 @@ Item { ...@@ -71,7 +71,7 @@ Item {
QGCLabel { QGCLabel {
id: flightModeLabel id: flightModeLabel
text: qsTr("Flight Mode Settings") text: qsTr("Flight Mode Settings")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
...@@ -136,7 +136,7 @@ Item { ...@@ -136,7 +136,7 @@ Item {
QGCLabel { QGCLabel {
text: qsTr("Switch Settings") text: qsTr("Switch Settings")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
......
...@@ -123,7 +123,7 @@ QGCView { ...@@ -123,7 +123,7 @@ QGCView {
QGCLabel { QGCLabel {
text: qsTr("Battery") text: qsTr("Battery")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
...@@ -236,7 +236,7 @@ QGCView { ...@@ -236,7 +236,7 @@ QGCView {
QGCLabel { QGCLabel {
text: qsTr("ESC PWM Minimum and Maximum Calibration") text: qsTr("ESC PWM Minimum and Maximum Calibration")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
...@@ -276,7 +276,7 @@ QGCView { ...@@ -276,7 +276,7 @@ QGCView {
QGCLabel { QGCLabel {
text: qsTr("UAVCAN Bus Configuration") text: qsTr("UAVCAN Bus Configuration")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
visible: showUAVCAN.checked visible: showUAVCAN.checked
} }
...@@ -306,7 +306,7 @@ QGCView { ...@@ -306,7 +306,7 @@ QGCView {
QGCLabel { QGCLabel {
text: qsTr("UAVCAN Motor Index and Direction Assignment") text: qsTr("UAVCAN Motor Index and Direction Assignment")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
visible: showUAVCAN.checked visible: showUAVCAN.checked
} }
...@@ -358,7 +358,7 @@ QGCView { ...@@ -358,7 +358,7 @@ QGCView {
QGCLabel { QGCLabel {
text: qsTr("Advanced Power Settings") text: qsTr("Advanced Power Settings")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
visible: showAdvanced.checked visible: showAdvanced.checked
} }
......
...@@ -44,7 +44,7 @@ QGCView { ...@@ -44,7 +44,7 @@ QGCView {
QGCPalette { id: palette; colorGroupEnabled: enabled } QGCPalette { id: palette; colorGroupEnabled: enabled }
property real _margins: ScreenTools.defaultFontPixelHeight property real _margins: ScreenTools.defaultFontPixelHeight
property real _middleRowWidth: ScreenTools.defaultFontPixelWidth * 22 property real _middleRowWidth: ScreenTools.defaultFontPixelWidth * 24
property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 18 property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 18
property Fact _fenceAction: controller.getParameterFact(-1, "GF_ACTION") property Fact _fenceAction: controller.getParameterFact(-1, "GF_ACTION")
...@@ -55,7 +55,7 @@ QGCView { ...@@ -55,7 +55,7 @@ QGCView {
property Fact _rcLossAction: controller.getParameterFact(-1, "NAV_RCL_ACT") property Fact _rcLossAction: controller.getParameterFact(-1, "NAV_RCL_ACT")
property Fact _dlLossAction: controller.getParameterFact(-1, "NAV_DLL_ACT") property Fact _dlLossAction: controller.getParameterFact(-1, "NAV_DLL_ACT")
property Fact _disarmLandDelay: controller.getParameterFact(-1, "COM_DISARM_LAND") property Fact _disarmLandDelay: controller.getParameterFact(-1, "COM_DISARM_LAND")
property Fact _landSpeedMC: controller.getParameterFact(-1, "MPC_LAND_SPEED", false) property Fact _landSpeedMC: controller.getParameterFact(-1, "MPC_LAND_SPEED", false)
QGCViewPanel { QGCViewPanel {
id: panel id: panel
...@@ -75,7 +75,7 @@ QGCView { ...@@ -75,7 +75,7 @@ QGCView {
Item { width: 1; height: _margins * 0.5; } Item { width: 1; height: _margins * 0.5; }
QGCLabel { QGCLabel {
text: qsTr("Low Battery Failsafe Trigger") text: qsTr("Low Battery Failsafe Trigger")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
color: palette.windowShade color: palette.windowShade
...@@ -146,7 +146,7 @@ QGCView { ...@@ -146,7 +146,7 @@ QGCView {
*/ */
QGCLabel { QGCLabel {
text: qsTr("RC Loss Failsafe Trigger") text: qsTr("RC Loss Failsafe Trigger")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
color: palette.windowShade color: palette.windowShade
...@@ -203,7 +203,7 @@ QGCView { ...@@ -203,7 +203,7 @@ QGCView {
*/ */
QGCLabel { QGCLabel {
text: qsTr("Data Link Loss Failsafe Trigger") text: qsTr("Data Link Loss Failsafe Trigger")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
color: palette.windowShade color: palette.windowShade
...@@ -260,7 +260,7 @@ QGCView { ...@@ -260,7 +260,7 @@ QGCView {
*/ */
QGCLabel { QGCLabel {
text: qsTr("Geofence Failsafe Trigger") text: qsTr("Geofence Failsafe Trigger")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
color: palette.windowShade color: palette.windowShade
...@@ -340,7 +340,7 @@ QGCView { ...@@ -340,7 +340,7 @@ QGCView {
QGCLabel { QGCLabel {
id: rtlLabel id: rtlLabel
text: qsTr("Return Home Settings") text: qsTr("Return Home Settings")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
id: rtlSettings id: rtlSettings
...@@ -453,7 +453,7 @@ QGCView { ...@@ -453,7 +453,7 @@ QGCView {
*/ */
QGCLabel { QGCLabel {
text: qsTr("Land Mode Settings") text: qsTr("Land Mode Settings")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Rectangle { Rectangle {
color: palette.windowShade color: palette.windowShade
......
...@@ -43,7 +43,7 @@ Item { ...@@ -43,7 +43,7 @@ Item {
visible: !_controller.videoRunning visible: !_controller.videoRunning
QGCLabel { QGCLabel {
text: qsTr("NO VIDEO") text: qsTr("NO VIDEO")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
color: "white" color: "white"
font.pixelSize: _mainIsMap ? 12 * ScreenTools.fontHRatio : 20 * ScreenTools.fontHRatio font.pixelSize: _mainIsMap ? 12 * ScreenTools.fontHRatio : 20 * ScreenTools.fontHRatio
anchors.centerIn: parent anchors.centerIn: parent
......
...@@ -200,7 +200,7 @@ Map { ...@@ -200,7 +200,7 @@ Map {
QGCLabel { QGCLabel {
id: scaleText id: scaleText
color: isSatelliteMap ? "white" : "black" color: isSatelliteMap ? "white" : "black"
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.right: parent.right anchors.right: parent.right
......
...@@ -90,7 +90,7 @@ Item { ...@@ -90,7 +90,7 @@ Item {
QGCLabel { QGCLabel {
text: active ? heading.toFixed(0) : qsTr("OFF") text: active ? heading.toFixed(0) : qsTr("OFF")
font.weight: active ? Font.DemiBold : Font.Light font.family: active ? ScreenTools.demiboldFontFamily : ScreenTools.normalFontFamily
font.pixelSize: _fontSize < 1 ? 1 : _fontSize; font.pixelSize: _fontSize < 1 ? 1 : _fontSize;
color: "white" color: "white"
anchors.centerIn: parent anchors.centerIn: parent
......
...@@ -71,7 +71,7 @@ Rectangle { ...@@ -71,7 +71,7 @@ Rectangle {
anchors.horizontalCenterOffset: -(_longDash * 0.8) anchors.horizontalCenterOffset: -(_longDash * 0.8)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
smooth: true smooth: true
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
font.pixelSize: _fontSize < 1 ? 1 : _fontSize; font.pixelSize: _fontSize < 1 ? 1 : _fontSize;
text: _pitch text: _pitch
color: "white" color: "white"
...@@ -82,7 +82,7 @@ Rectangle { ...@@ -82,7 +82,7 @@ Rectangle {
anchors.horizontalCenterOffset: (_longDash * 0.8) anchors.horizontalCenterOffset: (_longDash * 0.8)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
smooth: true smooth: true
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
font.pixelSize: _fontSize < 1 ? 1 : _fontSize; font.pixelSize: _fontSize < 1 ? 1 : _fontSize;
text: _pitch text: _pitch
color: "white" color: "white"
......
...@@ -96,7 +96,7 @@ QGCFlickable { ...@@ -96,7 +96,7 @@ QGCFlickable {
width: parent.width width: parent.width
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
font.pixelSize: ScreenTools.largeFontPixelSize * (largeValue ? 1.3 : 1.0) font.pixelSize: ScreenTools.largeFontPixelSize * (largeValue ? 1.3 : 1.0)
font.weight: largeValue ? Font.ExtraBold : Font.Normal font.family: largeValue ? ScreenTools.demiboldFontFamily : ScreenTools.normalFontFamily
fontSizeMode: Text.HorizontalFit fontSizeMode: Text.HorizontalFit
color: textColor color: textColor
text: fact.valueString text: fact.valueString
......
...@@ -62,12 +62,13 @@ Rectangle { ...@@ -62,12 +62,13 @@ Rectangle {
width: listview.width width: listview.width
Text { Text {
id: field
text: display
color: qgcPal.text
width: parent.width
wrapMode: Text.Wrap
font.family: ScreenTools.normalFontFamily
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
id: field
text: display
color: qgcPal.text
width: parent.width
wrapMode: Text.Wrap
} }
} }
} }
......
...@@ -11,7 +11,7 @@ Item { ...@@ -11,7 +11,7 @@ Item {
signal clicked() signal clicked()
property alias buttonImage: roundButton.buttonImage property alias buttonImage: roundButton.buttonImage
property alias rotateImage: roundButton.rotateImage property alias rotateImage: roundButton.rotateImage
property real radius: ScreenTools.defaultFontPixelHeight * 1.5 property real radius: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelHeight * 2.5 : ScreenTools.defaultFontPixelHeight * 1.5
property int dropDirection: dropDown property int dropDirection: dropDown
property alias dropDownComponent: dropDownLoader.sourceComponent property alias dropDownComponent: dropDownLoader.sourceComponent
property real viewportMargins: 0 property real viewportMargins: 0
......
...@@ -77,7 +77,7 @@ QGCView { ...@@ -77,7 +77,7 @@ QGCView {
QGCLabel { QGCLabel {
id: panelLabel id: panelLabel
text: panelTitle text: panelTitle
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
...@@ -111,7 +111,7 @@ QGCView { ...@@ -111,7 +111,7 @@ QGCView {
QGCLabel { QGCLabel {
text: title text: title
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
QGCLabel { QGCLabel {
......
...@@ -93,7 +93,7 @@ QGCViewDialog { ...@@ -93,7 +93,7 @@ QGCViewDialog {
QGCLabel { QGCLabel {
text: mavCmdInfo.friendlyName text: mavCmdInfo.friendlyName
color: textColor color: textColor
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
QGCLabel { QGCLabel {
......
...@@ -43,7 +43,7 @@ QGCView { ...@@ -43,7 +43,7 @@ QGCView {
QGCPalette { id: __qgcPal; colorGroupEnabled: true } QGCPalette { id: __qgcPal; colorGroupEnabled: true }
property Fact _editorDialogFact: Fact { } property Fact _editorDialogFact: Fact { }
property int _rowHeight: ScreenTools.defaultFontPixelHeight * 2 property int _rowHeight: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelHeight * 4 : ScreenTools.defaultFontPixelHeight * 2
property int _rowWidth: 10 // Dynamic adjusted at runtime property int _rowWidth: 10 // Dynamic adjusted at runtime
property bool _searchFilter: false ///< true: showing results of search property bool _searchFilter: false ///< true: showing results of search
property var _searchResults ///< List of parameter names from search results property var _searchResults ///< List of parameter names from search results
...@@ -53,7 +53,6 @@ QGCView { ...@@ -53,7 +53,6 @@ QGCView {
ParameterEditorController { ParameterEditorController {
id: controller; id: controller;
factPanel: panel factPanel: panel
onShowErrorMessage: { onShowErrorMessage: {
showMessage(qsTr("Parameter Load Errors"), errorMsg, StandardButton.Ok) showMessage(qsTr("Parameter Load Errors"), errorMsg, StandardButton.Ok)
} }
...@@ -76,7 +75,6 @@ QGCView { ...@@ -76,7 +75,6 @@ QGCView {
anchors.top: searchText.top anchors.top: searchText.top
anchors.bottom: searchText.bottom anchors.bottom: searchText.bottom
text: qsTr("Filter by:") text: qsTr("Filter by:")
onClicked: { onClicked: {
_searchResults = controller.searchParametersForComponent(-1, searchText.text) _searchResults = controller.searchParametersForComponent(-1, searchText.text)
_searchFilter = true _searchFilter = true
...@@ -184,7 +182,7 @@ QGCView { ...@@ -184,7 +182,7 @@ QGCView {
spacing: Math.ceil(ScreenTools.defaultFontPixelHeight * 0.25) spacing: Math.ceil(ScreenTools.defaultFontPixelHeight * 0.25)
QGCLabel { QGCLabel {
text: qsTr("Component #: %1)").arg(componentId.toString()) text: qsTr("Component #: %1)").arg(componentId.toString())
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
ExclusiveGroup { id: groupGroup } ExclusiveGroup { id: groupGroup }
......
...@@ -8,7 +8,7 @@ import QGroundControl.ScreenTools 1.0 ...@@ -8,7 +8,7 @@ import QGroundControl.ScreenTools 1.0
Button { Button {
property bool primary: false ///< primary button for a group of buttons property bool primary: false ///< primary button for a group of buttons
property var _qgcPal: QGCPalette { colorGroupEnabled: enabled } property var _qgcPal: QGCPalette { colorGroupEnabled: enabled }
property bool _showHighlight: (pressed | hovered | checked) && !__forceHoverOff property bool _showHighlight: (pressed | hovered | checked) && !__forceHoverOff
...@@ -60,7 +60,13 @@ Button { ...@@ -60,7 +60,13 @@ Button {
background: Item { background: Item {
property bool down: control.pressed || (control.checkable && control.checked) property bool down: control.pressed || (control.checkable && control.checked)
implicitWidth: Math.round(TextSingleton.implicitHeight * 4.5) implicitWidth: Math.round(TextSingleton.implicitHeight * 4.5)
implicitHeight: ScreenTools.isMobile ? ScreenTools.defaultFontPixelHeight * 2.5 : Math.max(25, Math.round(TextSingleton.implicitHeight * 1.2)) implicitHeight: {
if(ScreenTools.isTinyScreen)
return ScreenTools.defaultFontPixelHeight * 3.5
if(ScreenTools.isMobile)
return ScreenTools.defaultFontPixelHeight * 2.5
return Math.max(25, Math.round(TextSingleton.implicitHeight * 1.2))
}
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
...@@ -103,9 +109,8 @@ Button { ...@@ -103,9 +109,8 @@ Button {
antialiasing: true antialiasing: true
text: control.text text: control.text
font.pixelSize: ScreenTools.defaultFontPixelSize font.pixelSize: ScreenTools.defaultFontPixelSize
font.family: ScreenTools.normalFontFamily
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: _showHighlight ? color: _showHighlight ?
control._qgcPal.buttonHighlightText : control._qgcPal.buttonHighlightText :
(primary ? control._qgcPal.primaryButtonText : control._qgcPal.buttonText) (primary ? control._qgcPal.primaryButtonText : control._qgcPal.buttonText)
......
...@@ -30,8 +30,9 @@ CheckBox { ...@@ -30,8 +30,9 @@ CheckBox {
text: control.text text: control.text
antialiasing: true antialiasing: true
font.pixelSize: ScreenTools.defaultFontPixelSize font.pixelSize: ScreenTools.defaultFontPixelSize
font.family: ScreenTools.normalFontFamily
color: control.__qgcPal.text
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: control.__qgcPal.text
} }
} }
} }
......
...@@ -18,8 +18,14 @@ ComboBox { ...@@ -18,8 +18,14 @@ ComboBox {
control._qgcPal.buttonText control._qgcPal.buttonText
background: Item { background: Item {
implicitWidth: Math.round(TextSingleton.implicitHeight * 4.5) implicitWidth: Math.round(TextSingleton.implicitHeight * 4.5)
implicitHeight: ScreenTools.isMobile ? ScreenTools.defaultFontPixelHeight * 3 * 0.75 : Math.max(25, Math.round(TextSingleton.implicitHeight * 1.2)) implicitHeight: {
if(ScreenTools.isTinyScreen)
return ScreenTools.defaultFontPixelHeight * 3.5
if(ScreenTools.isMobile)
return ScreenTools.defaultFontPixelHeight * 2.5
return Math.max(25, Math.round(TextSingleton.implicitHeight * 1.2))
}
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
......
...@@ -11,6 +11,7 @@ Text { ...@@ -11,6 +11,7 @@ Text {
property bool enabled: true property bool enabled: true
font.pixelSize: ScreenTools.defaultFontPixelSize font.pixelSize: ScreenTools.defaultFontPixelSize
font.family: ScreenTools.normalFontFamily
color: __qgcPal.text color: __qgcPal.text
antialiasing: true antialiasing: true
} }
...@@ -29,11 +29,10 @@ RadioButton { ...@@ -29,11 +29,10 @@ RadioButton {
id: text id: text
text: control.text text: control.text
font.pixelSize: ScreenTools.defaultFontPixelSize font.pixelSize: ScreenTools.defaultFontPixelSize
font.family: ScreenTools.normalFontFamily
antialiasing: true antialiasing: true
color: control.__qgcPal.text
anchors.centerIn: parent anchors.centerIn: parent
color: control.__qgcPal.text
} }
} }
} }
......
...@@ -19,15 +19,23 @@ TextField { ...@@ -19,15 +19,23 @@ TextField {
property var __qgcPal: QGCPalette { colorGroupEnabled: enabled } property var __qgcPal: QGCPalette { colorGroupEnabled: enabled }
textColor: __qgcPal.textFieldText textColor: __qgcPal.textFieldText
height: ScreenTools.isMobile ? ScreenTools.defaultFontPixelHeight * 3 * 0.75 : implicitHeight
height: {
if(ScreenTools.isTinyScreen)
return ScreenTools.defaultFontPixelHeight * 3.5
if(ScreenTools.isMobile)
return ScreenTools.defaultFontPixelHeight * 2.5
return implicitHeight
}
Label { Label {
id: unitsLabelWidthGenerator id: unitsLabelWidthGenerator
text: unitsLabel text: unitsLabel
width: contentWidth + ((parent.__contentHeight/3)*2) width: contentWidth + ((parent.__contentHeight/3)*2)
visible: false visible: false
antialiasing: true antialiasing: true
font.family: ScreenTools.normalFontFamily
} }
style: TextFieldStyle { style: TextFieldStyle {
...@@ -50,21 +58,22 @@ TextField { ...@@ -50,21 +58,22 @@ TextField {
Text { Text {
id: unitsLabel id: unitsLabel
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment:Text.AlignHCenter
x: parent.width - width x: parent.width - width
width: unitsLabelWidthGenerator.width width: unitsLabelWidthGenerator.width
text: control.unitsLabel text: control.unitsLabel
font.pixelSize: ScreenTools.defaultFontPixelSize font.pixelSize: ScreenTools.defaultFontPixelSize
font.family: ScreenTools.normalFontFamily
antialiasing: true antialiasing: true
color: control.textColor color: control.textColor
visible: control.showUnits visible: control.showUnits
} }
} }
......
...@@ -10,7 +10,7 @@ Item { ...@@ -10,7 +10,7 @@ Item {
signal clicked() signal clicked()
property alias buttonImage: button.source property alias buttonImage: button.source
property real radius: ScreenTools.defaultFontPixelHeight * 1.5 property real radius: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelHeight * 2.5 : ScreenTools.defaultFontPixelHeight * 1.5
property bool rotateImage: false property bool rotateImage: false
property bool lightBorders: true property bool lightBorders: true
......
...@@ -9,14 +9,16 @@ import QGroundControl.ScreenToolsController 1.0 ...@@ -9,14 +9,16 @@ import QGroundControl.ScreenToolsController 1.0
Item { Item {
signal repaintRequested signal repaintRequested
property real availableHeight: 0 property real availableHeight: 0
readonly property real defaultFontPixelSize: _textMeasure.fontHeight * ScreenToolsController.defaultFontPixelSizeRatio property real defaultFontPixelSize: 1
readonly property real defaultFontPixelHeight: defaultFontPixelSize property real defaultFontPixelHeight: 1
readonly property real defaultFontPixelWidth: _textMeasure.fontWidth * ScreenToolsController.defaultFontPixelSizeRatio property real defaultFontPixelWidth: 1
readonly property real smallFontPixelSize: defaultFontPixelSize * ScreenToolsController.smallFontPixelSizeRatio property real smallFontPixelSize: 1
readonly property real smallFontPixelHeight: smallFontPixelSize property real smallFontPixelHeight: 1
readonly property real smallFontPixelWidth: defaultFontPixelWidth * ScreenToolsController.smallFontPixelSizeRatio property real smallFontPixelWidth: 1
property real mediumFontPixelSize: 1
property real largeFontPixelSize: 1
// To proportionally scale fonts // To proportionally scale fonts
...@@ -27,8 +29,8 @@ Item { ...@@ -27,8 +29,8 @@ Item {
// On OSX ElCapitan with Qt 5.4.0 any font pixel size above 19 shows garbage test. No idea why at this point. // On OSX ElCapitan with Qt 5.4.0 any font pixel size above 19 shows garbage test. No idea why at this point.
// Will remove Math.min when problem is figure out. // Will remove Math.min when problem is figure out.
readonly property real mediumFontPixelSize: Math.min(defaultFontPixelSize * ScreenToolsController.mediumFontPixelSizeRatio, ScreenToolsController.isMobile ? 10000 : 19) // readonly property real mediumFontPixelSize: Math.min(defaultFontPixelSize * ScreenToolsController.mediumFontPixelSizeRatio, ScreenToolsController.isMobile ? 10000 : 19)
readonly property real largeFontPixelSize: Math.min(defaultFontPixelSize * ScreenToolsController.largeFontPixelSizeRatio, ScreenToolsController.isMobile ? 10000 : 19) // readonly property real largeFontPixelSize: Math.min(defaultFontPixelSize * ScreenToolsController.largeFontPixelSizeRatio, ScreenToolsController.isMobile ? 10000 : 19)
property bool isAndroid: ScreenToolsController.isAndroid property bool isAndroid: ScreenToolsController.isAndroid
property bool isiOS: ScreenToolsController.isiOS property bool isiOS: ScreenToolsController.isiOS
...@@ -37,6 +39,9 @@ Item { ...@@ -37,6 +39,9 @@ Item {
property bool isTinyScreen: (Screen.width / Screen.pixelDensity) < 120 // 120mm property bool isTinyScreen: (Screen.width / Screen.pixelDensity) < 120 // 120mm
property bool isShortScreen: ScreenToolsController.isMobile && ((Screen.height / Screen.width) < 0.6) // Nexus 7 for example property bool isShortScreen: ScreenToolsController.isMobile && ((Screen.height / Screen.width) < 0.6) // Nexus 7 for example
readonly property string normalFontFamily: "opensans"
readonly property string demiboldFontFamily: "opensans-demibold"
function mouseX() { function mouseX() {
return ScreenToolsController.mouseX() return ScreenToolsController.mouseX()
} }
...@@ -48,7 +53,29 @@ Item { ...@@ -48,7 +53,29 @@ Item {
Text { Text {
id: _textMeasure id: _textMeasure
text: "X" text: "X"
property real fontWidth: contentWidth * (ScreenToolsController.testHighDPI ? 2 : 1) font.family: normalFontFamily
property real fontHeight: contentHeight * (ScreenToolsController.testHighDPI ? 2 : 1) property real fontWidth: contentWidth * (ScreenToolsController.testHighDPI ? 2 : 1)
property real fontHeight: contentHeight * (ScreenToolsController.testHighDPI ? 2 : 1)
Component.onCompleted: {
var fudgeFactor = 1.0
// Small Android Devices (Large Scaling Error)
if(ScreenToolsController.isAndroid && (Screen.width / Screen.pixelDensity) < 120) {
fudgeFactor = 0.6
// Nexus 7 type
} else if(ScreenToolsController.isAndroid && (Screen.height / Screen.width) < 0.6) {
fudgeFactor = 0.75
// iPhones
} else if (ScreenToolsController.isiOS && (Screen.width / Screen.pixelDensity) < 120) {
fudgeFactor = 0.75
}
defaultFontPixelSize = _textMeasure.fontHeight * ScreenToolsController.defaultFontPixelSizeRatio * fudgeFactor
defaultFontPixelHeight = defaultFontPixelSize * fudgeFactor
defaultFontPixelWidth = _textMeasure.fontWidth * ScreenToolsController.defaultFontPixelSizeRatio * fudgeFactor
smallFontPixelSize = defaultFontPixelSize * ScreenToolsController.smallFontPixelSizeRatio * fudgeFactor
smallFontPixelHeight = smallFontPixelSize * fudgeFactor
smallFontPixelWidth = defaultFontPixelWidth * ScreenToolsController.smallFontPixelSizeRatio * fudgeFactor
mediumFontPixelSize = defaultFontPixelSize * ScreenToolsController.mediumFontPixelSizeRatio * fudgeFactor
largeFontPixelSize = defaultFontPixelSize * ScreenToolsController.largeFontPixelSizeRatio * fudgeFactor
}
} }
} }
...@@ -32,7 +32,9 @@ const double ScreenToolsController::_defaultFontPixelSizeRatio = 1.0; ...@@ -32,7 +32,9 @@ const double ScreenToolsController::_defaultFontPixelSizeRatio = 1.0;
#elif __android__ #elif __android__
const double ScreenToolsController::_defaultFontPixelSizeRatio = 1.0; const double ScreenToolsController::_defaultFontPixelSizeRatio = 1.0;
#elif __ios__ #elif __ios__
const double ScreenToolsController::_defaultFontPixelSizeRatio = 0.6; const double ScreenToolsController::_defaultFontPixelSizeRatio = 0.8;
#elif defined Q_OS_LINUX
const double ScreenToolsController::_defaultFontPixelSizeRatio = 0.8;
#else #else
const double ScreenToolsController::_defaultFontPixelSizeRatio = 0.8; const double ScreenToolsController::_defaultFontPixelSizeRatio = 0.8;
#endif #endif
......
...@@ -14,7 +14,7 @@ Button { ...@@ -14,7 +14,7 @@ Button {
text: "Button" ///< Pass in your own button text text: "Button" ///< Pass in your own button text
checkable: true checkable: true
implicitHeight: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelHeight * 3 : ScreenTools.defaultFontPixelHeight * 2.5 implicitHeight: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelHeight * 5 : ScreenTools.defaultFontPixelHeight * 2.5
style: ButtonStyle { style: ButtonStyle {
id: buttonStyle id: buttonStyle
......
...@@ -49,7 +49,7 @@ QGCView { ...@@ -49,7 +49,7 @@ QGCView {
QGCLabel { QGCLabel {
id: titleLabel id: titleLabel
text: qsTr("PX4Flow Camera") text: qsTr("PX4Flow Camera")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
} }
Image { Image {
......
...@@ -35,11 +35,13 @@ import QGroundControl.Palette 1.0 ...@@ -35,11 +35,13 @@ import QGroundControl.Palette 1.0
Rectangle { Rectangle {
id: _summaryRoot id: _summaryRoot
anchors.fill: parent anchors.fill: parent
anchors.rightMargin: ScreenTools.defaultFontPixelWidth
anchors.leftMargin: ScreenTools.defaultFontPixelWidth
color: qgcPal.window color: qgcPal.window
property real _minSummaryW: ScreenTools.defaultFontPixelWidth * 40 property real _minSummaryW: ScreenTools.defaultFontPixelWidth * 42
property real _summaryBoxWidth: _minSummaryW property real _summaryBoxWidth: _minSummaryW
property real _summaryBoxSpace: ScreenTools.defaultFontPixelWidth property real _summaryBoxSpace: ScreenTools.defaultFontPixelWidth * 2
function computeSummaryBoxSize() { function computeSummaryBoxSize() {
var sw = 0 var sw = 0
...@@ -51,7 +53,7 @@ Rectangle { ...@@ -51,7 +53,7 @@ Rectangle {
} else { } else {
_summaryBoxSpace = 0 _summaryBoxSpace = 0
if(idx > 1) { if(idx > 1) {
_summaryBoxSpace = ScreenTools.defaultFontPixelWidth _summaryBoxSpace = ScreenTools.defaultFontPixelWidth * 2
sw = _summaryBoxSpace * (idx - 1) sw = _summaryBoxSpace * (idx - 1)
} }
rw = _summaryRoot.width - sw rw = _summaryRoot.width - sw
...@@ -92,7 +94,7 @@ Rectangle { ...@@ -92,7 +94,7 @@ Rectangle {
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: setupComplete ? qgcPal.text : qgcPal.warningText color: setupComplete ? qgcPal.text : qgcPal.warningText
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: setupComplete ? text: setupComplete ?
qsTr("Below you will find a summary of the settings for your vehicle. To the left are the setup menus for each component.") : qsTr("Below you will find a summary of the settings for your vehicle. To the left are the setup menus for each component.") :
...@@ -111,11 +113,16 @@ Rectangle { ...@@ -111,11 +113,16 @@ Rectangle {
// Outer summary item rectangle // Outer summary item rectangle
Rectangle { Rectangle {
width: _summaryBoxWidth width: _summaryBoxWidth
height: ScreenTools.defaultFontPixelHeight * 13 height: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelHeight * 20 : ScreenTools.defaultFontPixelHeight * 13
color: qgcPal.window color: qgcPal.windowShade
visible: modelData.summaryQmlSource.toString() !== "" visible: modelData.summaryQmlSource.toString() !== ""
border.width: 1
border.color: qgcPal.text
Component.onCompleted: {
border.color = Qt.rgba(border.color.r, border.color.g, border.color.b, 0.1)
}
readonly property real titleHeight: ScreenTools.defaultFontPixelHeight * 2 readonly property real titleHeight: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelHeight * 4 : ScreenTools.defaultFontPixelHeight * 2
// Title bar // Title bar
QGCButton { QGCButton {
...@@ -126,21 +133,19 @@ Rectangle { ...@@ -126,21 +133,19 @@ Rectangle {
// Setup indicator // Setup indicator
Rectangle { Rectangle {
anchors.rightMargin: ScreenTools.defaultFontPixelWidth * 0.5 anchors.rightMargin: ScreenTools.defaultFontPixelWidth
anchors.right: parent.right anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: ScreenTools.defaultFontPixelWidth * 1.5 width: ScreenTools.defaultFontPixelWidth * 1.75
height: width height: width
radius: width / 2 radius: width / 2
color: modelData.setupComplete ? "#00d932" : "red" color: modelData.setupComplete ? "#00d932" : "red"
visible: modelData.requiresSetup visible: modelData.requiresSetup
} }
onClicked : { onClicked : {
setupView.showVehicleComponentPanel(modelData) setupView.showVehicleComponentPanel(modelData)
} }
} }
// Summary Qml // Summary Qml
Rectangle { Rectangle {
anchors.top: titleBar.bottom anchors.top: titleBar.bottom
......
...@@ -141,6 +141,14 @@ MainWindow::MainWindow() ...@@ -141,6 +141,14 @@ MainWindow::MainWindow()
Q_ASSERT(_instance == NULL); Q_ASSERT(_instance == NULL);
_instance = this; _instance = this;
//-- Load fonts
if(QFontDatabase::addApplicationFont(":/fonts/opensans") < 0) {
qWarning() << "Could not load /fonts/opensans font";
}
if(QFontDatabase::addApplicationFont(":/fonts/opensans-demibold") < 0) {
qWarning() << "Could not load /fonts/opensans-demibold font";
}
// Qt 4/5 on Ubuntu does place the native menubar correctly so on Linux we revert back to in-window menu bar. // Qt 4/5 on Ubuntu does place the native menubar correctly so on Linux we revert back to in-window menu bar.
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
menuBar()->setNativeMenuBar(false); menuBar()->setNativeMenuBar(false);
......
...@@ -368,10 +368,11 @@ Item { ...@@ -368,10 +368,11 @@ Item {
pixelAligned: true pixelAligned: true
clip: true clip: true
TextEdit { TextEdit {
id: messageText id: messageText
readOnly: true readOnly: true
textFormat: TextEdit.RichText textFormat: TextEdit.RichText
color: "white" color: "white"
font.family: ScreenTools.normalFontFamily
} }
} }
//-- Dismiss System Message //-- Dismiss System Message
...@@ -379,8 +380,8 @@ Item { ...@@ -379,8 +380,8 @@ Item {
anchors.margins: ScreenTools.defaultFontPixelHeight anchors.margins: ScreenTools.defaultFontPixelHeight
anchors.top: parent.top anchors.top: parent.top
anchors.right: parent.right anchors.right: parent.right
width: ScreenTools.defaultFontPixelHeight * 1.5 width: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelHeight * 2.5 : ScreenTools.defaultFontPixelHeight * 1.5
height: ScreenTools.defaultFontPixelHeight * 1.5 height: width
source: "/res/XDelete.svg" source: "/res/XDelete.svg"
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
mipmap: true mipmap: true
...@@ -404,7 +405,8 @@ Item { ...@@ -404,7 +405,8 @@ Item {
criticalMessageText.text = "" criticalMessageText.text = ""
//-- Show all messages in queue //-- Show all messages in queue
for (var i = 0; i < mainWindow.messageQueue.length; i++) { for (var i = 0; i < mainWindow.messageQueue.length; i++) {
criticalMessageText.append(mainWindow.messageQueue[i]) var text = mainWindow.messageQueue[i]
criticalMessageText.append(text)
} }
//-- Clear it //-- Clear it
mainWindow.messageQueue = [] mainWindow.messageQueue = []
...@@ -449,7 +451,7 @@ Item { ...@@ -449,7 +451,7 @@ Item {
anchors.left: parent.left anchors.left: parent.left
readOnly: true readOnly: true
textFormat: TextEdit.RichText textFormat: TextEdit.RichText
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
wrapMode: TextEdit.WordWrap wrapMode: TextEdit.WordWrap
color: qgcPal.warningText color: qgcPal.warningText
} }
...@@ -461,12 +463,11 @@ Item { ...@@ -461,12 +463,11 @@ Item {
anchors.margins: ScreenTools.defaultFontPixelHeight anchors.margins: ScreenTools.defaultFontPixelHeight
anchors.top: parent.top anchors.top: parent.top
anchors.right: parent.right anchors.right: parent.right
width: ScreenTools.defaultFontPixelHeight * 1.5 width: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelHeight * 2.5 : ScreenTools.defaultFontPixelHeight * 1.5
height: ScreenTools.defaultFontPixelHeight * 1.5 height: width
source: "/res/XDelete.svg" source: "/res/XDelete.svg"
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
color: qgcPal.warningText color: qgcPal.warningText
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: {
......
...@@ -133,7 +133,7 @@ Item { ...@@ -133,7 +133,7 @@ Item {
// This is the menu dialog panel which is anchored to the left edge // This is the menu dialog panel which is anchored to the left edge
Rectangle { Rectangle {
id: __leftMenu id: __leftMenu
width: ScreenTools.defaultFontPixelWidth * 14 width: ScreenTools.defaultFontPixelWidth * 16
anchors.left: parent.left anchors.left: parent.left
anchors.top: __topSeparator.bottom anchors.top: __topSeparator.bottom
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
...@@ -193,7 +193,6 @@ Item { ...@@ -193,7 +193,6 @@ Item {
anchors.right: parent.right anchors.right: parent.right
text: qsTr("Offline Maps") text: qsTr("Offline Maps")
exclusiveGroup: panelActionGroup exclusiveGroup: panelActionGroup
visible: !ScreenTools.isTinyScreen
onClicked: { onClicked: {
if(__rightPanel.source != "OfflineMap.qml") { if(__rightPanel.source != "OfflineMap.qml") {
__rightPanel.source = "OfflineMap.qml" __rightPanel.source = "OfflineMap.qml"
......
...@@ -44,9 +44,10 @@ QGCView { ...@@ -44,9 +44,10 @@ QGCView {
anchors.fill: parent anchors.fill: parent
Text { Text {
id: _textMeasure id: _textMeasure
text: "X" text: "X"
color: qgcPal.window color: qgcPal.window
font.family: ScreenTools.normalFontFamily
} }
GridLayout { GridLayout {
...@@ -57,74 +58,92 @@ QGCView { ...@@ -57,74 +58,92 @@ QGCView {
Text { Text {
text: qsTr("Qt Platform:") text: qsTr("Qt Platform:")
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: Qt.platform.os text: Qt.platform.os
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: qsTr("Default font width:") text: qsTr("Default font width:")
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: _textMeasure.contentWidth text: _textMeasure.contentWidth
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: qsTr("Default font height:") text: qsTr("Default font height:")
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: _textMeasure.contentHeight text: _textMeasure.contentHeight
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: qsTr("Default font pixel size:") text: qsTr("Default font pixel size:")
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: _textMeasure.font.pixelSize text: _textMeasure.font.pixelSize
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: qsTr("Default font point size:") text: qsTr("Default font point size:")
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: _textMeasure.font.pointSize text: _textMeasure.font.pointSize
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: qsTr("QML Screen Desktop:") text: qsTr("QML Screen Desktop:")
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: Screen.desktopAvailableWidth + " x " + Screen.desktopAvailableHeight text: Screen.desktopAvailableWidth + " x " + Screen.desktopAvailableHeight
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: qsTr("QML Screen Size:") text: qsTr("QML Screen Size:")
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: Screen.width + " x " + Screen.height text: Screen.width + " x " + Screen.height
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: qsTr("QML Pixel Density:") text: qsTr("QML Pixel Density:")
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: Screen.pixelDensity text: Screen.pixelDensity
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: qsTr("QML Pixel Ratio:") text: qsTr("QML Pixel Ratio:")
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
Text { Text {
text: Screen.devicePixelRatio text: Screen.devicePixelRatio
color: qgcPal.text color: qgcPal.text
font.family: ScreenTools.normalFontFamily
} }
} }
......
...@@ -134,7 +134,7 @@ Rectangle { ...@@ -134,7 +134,7 @@ Rectangle {
*/ */
readonly property real tbFontSmall: 10 * ScreenTools.fontHRatio readonly property real tbFontSmall: 8 * ScreenTools.fontHRatio
readonly property real tbFontNormal: 12 * ScreenTools.fontHRatio readonly property real tbFontNormal: 12 * ScreenTools.fontHRatio
readonly property real tbFontLarge: 18 * ScreenTools.fontHRatio readonly property real tbFontLarge: 18 * ScreenTools.fontHRatio
...@@ -212,9 +212,9 @@ Rectangle { ...@@ -212,9 +212,9 @@ Rectangle {
anchors.centerIn: parent anchors.centerIn: parent
QGCLabel { QGCLabel {
id: gpsLabel id: gpsLabel
text: (activeVehicle && activeVehicle.gps.count.value >= 0) ? qsTr("GPS Status") : qsTr("GPS Data Unavailable") text: (activeVehicle && activeVehicle.gps.count.value >= 0) ? qsTr("GPS Status") : qsTr("GPS Data Unavailable")
font.weight:Font.DemiBold font.family: ScreenTools.demiboldFontFamily
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
...@@ -266,9 +266,9 @@ Rectangle { ...@@ -266,9 +266,9 @@ Rectangle {
anchors.centerIn: parent anchors.centerIn: parent
QGCLabel { QGCLabel {
id: battLabel id: battLabel
text: qsTr("Battery Status") text: qsTr("Battery Status")
font.weight:Font.DemiBold font.family: ScreenTools.demiboldFontFamily
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
...@@ -313,9 +313,9 @@ Rectangle { ...@@ -313,9 +313,9 @@ Rectangle {
anchors.centerIn: parent anchors.centerIn: parent
QGCLabel { QGCLabel {
id: rssiLabel id: rssiLabel
text: activeVehicle ? (activeVehicle.rcRSSI != 255 ? qsTr("RC RSSI Status") : qsTr("RC RSSI Data Unavailable")) : qsTr("N/A", "No data avaliable") text: activeVehicle ? (activeVehicle.rcRSSI != 255 ? qsTr("RC RSSI Status") : qsTr("RC RSSI Data Unavailable")) : qsTr("N/A", "No data avaliable")
font.weight:Font.DemiBold font.family: ScreenTools.demiboldFontFamily
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
...@@ -361,7 +361,7 @@ Rectangle { ...@@ -361,7 +361,7 @@ Rectangle {
QGCLabel { QGCLabel {
id: telemLabel id: telemLabel
text: qsTr("Telemetry RSSI Status") text: qsTr("Telemetry RSSI Status")
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
...@@ -504,7 +504,7 @@ Rectangle { ...@@ -504,7 +504,7 @@ Rectangle {
id: connectionLost id: connectionLost
text: qsTr("COMMUNICATION LOST") text: qsTr("COMMUNICATION LOST")
font.pixelSize: tbFontLarge font.pixelSize: tbFontLarge
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
color: colorRed color: colorRed
anchors.rightMargin: ScreenTools.defaultFontPixelWidth anchors.rightMargin: ScreenTools.defaultFontPixelWidth
anchors.right: disconnectButton.left anchors.right: disconnectButton.left
......
...@@ -183,12 +183,13 @@ Row { ...@@ -183,12 +183,13 @@ Row {
QGCLabel { QGCLabel {
anchors.top: parent.top anchors.top: parent.top
anchors.leftMargin: gpsIcon.width //anchors.leftMargin: gpsIcon.width
anchors.left: parent.left //anchors.left: parent.left
anchors.right: gpsRow.right
visible: activeVehicle && !isNaN(activeVehicle.gps.hdop.value) visible: activeVehicle && !isNaN(activeVehicle.gps.hdop.value)
font.pixelSize: tbFontSmall font.pixelSize: tbFontSmall
color: qgcPal.buttonText color: qgcPal.buttonText
text: activeVehicle ? activeVehicle.gps.hdop.valueString : "" text: activeVehicle ? activeVehicle.gps.hdop.value.toFixed(0) : ""
} }
MouseArea { MouseArea {
...@@ -470,7 +471,7 @@ Row { ...@@ -470,7 +471,7 @@ Row {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
font.pixelSize: ScreenTools.smallFontPixelSize font.pixelSize: ScreenTools.smallFontPixelSize
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
color: colorWhite color: colorWhite
} }
} }
...@@ -503,7 +504,7 @@ Row { ...@@ -503,7 +504,7 @@ Row {
QGCLabel { QGCLabel {
text: 'R ' text: 'R '
font.pixelSize: ScreenTools.smallFontPixelSize font.pixelSize: ScreenTools.smallFontPixelSize
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
color: colorWhite color: colorWhite
} }
QGCLabel { QGCLabel {
...@@ -511,7 +512,7 @@ Row { ...@@ -511,7 +512,7 @@ Row {
width: getProportionalDimmension(30) width: getProportionalDimmension(30)
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
font.pixelSize: ScreenTools.smallFontPixelSize font.pixelSize: ScreenTools.smallFontPixelSize
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
color: colorWhite color: colorWhite
} }
} }
...@@ -520,7 +521,7 @@ Row { ...@@ -520,7 +521,7 @@ Row {
QGCLabel { QGCLabel {
text: 'L ' text: 'L '
font.pixelSize: ScreenTools.smallFontPixelSize font.pixelSize: ScreenTools.smallFontPixelSize
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
color: colorWhite color: colorWhite
} }
QGCLabel { QGCLabel {
...@@ -528,7 +529,7 @@ Row { ...@@ -528,7 +529,7 @@ Row {
width: getProportionalDimmension(30) width: getProportionalDimmension(30)
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
font.pixelSize: ScreenTools.smallFontPixelSize font.pixelSize: ScreenTools.smallFontPixelSize
font.weight: Font.DemiBold font.family: ScreenTools.demiboldFontFamily
color: colorWhite color: colorWhite
} }
} }
......
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