Skip to content

Commit

Permalink
Merge pull request #3333 from dogmaphobic/pointSizeFont
Browse files Browse the repository at this point in the history
UI Layout Reorg
  • Loading branch information
dogmaphobic committed May 5, 2016
2 parents 3f55f67 + e2c65e4 commit 779d970
Show file tree
Hide file tree
Showing 78 changed files with 515 additions and 679 deletions.
2 changes: 1 addition & 1 deletion src/AutoPilotPlugins/APM/APMAirframeComponent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ QGCView {
anchors.left: parent.left
anchors.right: applyButton.right
text: qsTr("Please select your airframe type")
font.pixelSize: ScreenTools.mediumFontPixelSize
font.pointSize: ScreenTools.mediumFontPointSize
wrapMode: Text.WordWrap
}

Expand Down
5 changes: 1 addition & 4 deletions src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ FactPanel {

property Fact sysIdFact: controller.getParameterFact(-1, "FRAME")


Column {
anchors.fill: parent
anchors.margins: 8

anchors.fill: parent
VehicleSummaryRow {
id: nameRow;
labelText: qsTr("Frame Type:")
Expand Down
1 change: 0 additions & 1 deletion src/AutoPilotPlugins/APM/APMCameraComponentSummary.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ FactPanel {

Column {
anchors.fill: parent
anchors.margins: 8

VehicleSummaryRow {
visible: _mountTypeExists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ FactPanel {

Column {
anchors.fill: parent
anchors.margins: 8

VehicleSummaryRow {
labelText: qsTr("Flight Mode 1:")
Expand Down
1 change: 0 additions & 1 deletion src/AutoPilotPlugins/APM/APMPowerComponentSummary.qml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ FactPanel {

Column {
anchors.fill: parent
anchors.margins: 8

VehicleSummaryRow {
labelText: qsTr("Battery monitor:")
Expand Down
1 change: 0 additions & 1 deletion src/AutoPilotPlugins/APM/APMRadioComponentSummary.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ FactPanel {

Column {
anchors.fill: parent
anchors.margins: 8

VehicleSummaryRow {
labelText: qsTr("Roll:")
Expand Down
1 change: 1 addition & 0 deletions src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ QGCView {
anchors.top: parent.top
height: ScreenTools.defaultFontPixelWidth * 20
width: ScreenTools.defaultFontPixelWidth * 20
sourceSize.width: width
mipmap: true
fillMode: Image.PreserveAspectFit
visible: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ FactPanel {

Column {
anchors.fill: parent
anchors.margins: 8

VehicleSummaryRow {
labelText: qsTr("Arming Checks:")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ FactPanel {

Column {
anchors.fill: parent
anchors.margins: 8

VehicleSummaryRow {
labelText: qsTr("Throttle failsafe:")
Expand Down
8 changes: 4 additions & 4 deletions src/AutoPilotPlugins/APM/APMSensorsComponent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ QGCView {
readonly property string _badCompassCalText: "The calibration for Compass %1 appears to be poor. " +
"Check the compass position within your vehicle and re-do the calibration."

readonly property int sideBarH1PointSize: ScreenTools.mediumFontPixelSize
readonly property int mainTextH1PointSize: ScreenTools.mediumFontPixelSize // Seems to be unused
readonly property int sideBarH1PointSize: ScreenTools.mediumFontPointSize
readonly property int mainTextH1PointSize: ScreenTools.mediumFontPointSize // Seems to be unused

readonly property int rotationColumnWidth: 250

Expand Down Expand Up @@ -269,7 +269,7 @@ QGCView {

Column {
QGCLabel {
font.pixelSize: sideBarH1PointSize
font.pointSize: sideBarH1PointSize
text: qsTr("Set Orientations")
}

Expand Down Expand Up @@ -459,7 +459,7 @@ QGCView {
anchors.left: orientationCalArea.left
width: parent.width
wrapMode: Text.WordWrap
font.pixelSize: ScreenTools.mediumFontPixelSize
font.pointSize: ScreenTools.mediumFontPointSize
}

Flow {
Expand Down
1 change: 0 additions & 1 deletion src/AutoPilotPlugins/APM/APMSensorsComponentSummary.qml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ FactPanel {

Column {
anchors.fill: parent
anchors.margins: 8

VehicleSummaryRow {
labelText: qsTr("Compass 1:")
Expand Down
47 changes: 24 additions & 23 deletions src/AutoPilotPlugins/Common/ESP8266Component.qml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ QGCView {
QGCPalette { id: palette; colorGroupEnabled: panel.enabled }

property real _margins: ScreenTools.defaultFontPixelHeight
property real _middleRowWidth: ScreenTools.defaultFontPixelWidth * 22
property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 20
property real _labelWidth: ScreenTools.defaultFontPixelWidth * 12
property real _statusWidth: ScreenTools.defaultFontPixelWidth * 8
property real _smallFont: ScreenTools.smallFontPixelSize
property real _middleRowWidth: ScreenTools.defaultFontPixelWidth * 18
property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 16
property real _labelWidth: ScreenTools.defaultFontPixelWidth * 10
property real _statusWidth: ScreenTools.defaultFontPixelWidth * 6
property real _smallFont: ScreenTools.smallFontPointSize

readonly property string dialogTitle: qsTr("controller WiFi Bridge")
property int stStatus: XMLHttpRequest.UNSENT
Expand Down Expand Up @@ -146,6 +146,7 @@ QGCView {
color: palette.text
width: ScreenTools.defaultFontPixelWidth * 12
height: width * 1.45
sourceSize.height: width * 1.45
mipmap: true
fillMode: Image.PreserveAspectFit
source: wifiMode ? (wifiMode.value === 0 ? "/qmlimages/APMode.svg" : "/qmlimages/StationMode.svg") : "/qmlimages/APMode.svg"
Expand Down Expand Up @@ -319,39 +320,39 @@ QGCView {
spacing: _margins
QGCLabel {
text: qsTr("Messages Received")
font.pixelSize: _smallFont
font.pointSize: _smallFont
width: _labelWidth
}
QGCLabel {
id: vpackets
font.pixelSize: _smallFont
font.pointSize: _smallFont
width: _statusWidth
horizontalAlignment: Text.AlignRight
}
}
Row {
spacing: _margins
QGCLabel {
font.pixelSize: _smallFont
font.pointSize: _smallFont
text: qsTr("Messages Received")
width: _labelWidth
}
QGCLabel {
id: gpackets
font.pixelSize: _smallFont
font.pointSize: _smallFont
width: _statusWidth
horizontalAlignment: Text.AlignRight
}
}
Row {
spacing: _margins
QGCLabel {
font.pixelSize: _smallFont
font.pointSize: _smallFont
text: qsTr("Messages Received")
width: _labelWidth
}
QGCLabel {
font.pixelSize: _smallFont
font.pointSize: _smallFont
text: controller.vehicle ? thisThingHasNoNumberLocaleSupport(controller.vehicle.messagesReceived) : 0
width: _statusWidth
horizontalAlignment: Text.AlignRight
Expand All @@ -361,84 +362,84 @@ QGCView {
spacing: _margins
QGCLabel {
text: qsTr("Messages Lost")
font.pixelSize: _smallFont
font.pointSize: _smallFont
width: _labelWidth
}
QGCLabel {
id: vlost
width: _statusWidth
horizontalAlignment: Text.AlignRight
font.pixelSize: _smallFont
font.pointSize: _smallFont
}
}
Row {
spacing: _margins
QGCLabel {
text: qsTr("Messages Lost")
font.pixelSize: _smallFont
font.pointSize: _smallFont
width: _labelWidth
}
QGCLabel {
id: glost
width: _statusWidth
horizontalAlignment: Text.AlignRight
font.pixelSize: _smallFont
font.pointSize: _smallFont
}
}
Row {
spacing: _margins
QGCLabel {
text: qsTr("Messages Lost")
font.pixelSize: _smallFont
font.pointSize: _smallFont
width: _labelWidth
}
QGCLabel {
text: controller.vehicle ? thisThingHasNoNumberLocaleSupport(controller.vehicle.messagesLost) : 0
width: _statusWidth
horizontalAlignment: Text.AlignRight
font.pixelSize: _smallFont
font.pointSize: _smallFont
}
}
Row {
spacing: _margins
QGCLabel {
text: qsTr("Messages Sent")
font.pixelSize: _smallFont
font.pointSize: _smallFont
width: _labelWidth
}
QGCLabel {
id: vsent
width: _statusWidth
horizontalAlignment: Text.AlignRight
font.pixelSize: _smallFont
font.pointSize: _smallFont
}
}
Row {
spacing: _margins
QGCLabel {
text: qsTr("Messages Sent")
font.pixelSize: _smallFont
font.pointSize: _smallFont
width: _labelWidth
}
QGCLabel {
id: gsent
width: _statusWidth
horizontalAlignment: Text.AlignRight
font.pixelSize: _smallFont
font.pointSize: _smallFont
}
}
Row {
spacing: _margins
QGCLabel {
text: qsTr("Messages Sent")
font.pixelSize: _smallFont
font.pointSize: _smallFont
width: _labelWidth
}
QGCLabel {
text: controller.vehicle ? thisThingHasNoNumberLocaleSupport(controller.vehicle.messagesSent) : 0
width: _statusWidth
horizontalAlignment: Text.AlignRight
font.pixelSize: _smallFont
font.pointSize: _smallFont
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ FactPanel {

Column {
anchors.fill: parent
anchors.margins: 8
VehicleSummaryRow {
labelText: qsTr("Firmware Version:")
valueText: esp8266.version
Expand Down
12 changes: 4 additions & 8 deletions src/AutoPilotPlugins/PX4/AirframeComponentSummary.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import QGroundControl.Controllers 1.0
import QGroundControl.Palette 1.0

FactPanel {
id: panel
anchors.fill: parent
color: qgcPal.windowShadeDark
id: panel
anchors.fill: parent
color: qgcPal.windowShadeDark

QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
AirframeComponentController { id: controller; factPanel: panel }
Expand All @@ -21,19 +21,15 @@ FactPanel {
property bool autoStartSet: sysAutoStartFact ? (sysAutoStartFact.value !== 0) : false

Column {
anchors.fill: parent
anchors.margins: 8

anchors.fill: parent
VehicleSummaryRow {
labelText: qsTr("System ID:")
valueText: sysIdFact ? sysIdFact.valueString : ""
}

VehicleSummaryRow {
labelText: qsTr("Airframe type:")
valueText: autoStartSet ? controller.currentAirframeType : qsTr("Setup required")
}

VehicleSummaryRow {
labelText: qsTr("Vehicle:")
valueText: autoStartSet ? controller.currentVehicleName : qsTr("Setup required")
Expand Down
5 changes: 3 additions & 2 deletions src/AutoPilotPlugins/PX4/CameraComponent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ QGCView {
QGCPalette { id: palette; colorGroupEnabled: enabled }

property real _margins: ScreenTools.defaultFontPixelHeight
property real _middleRowWidth: ScreenTools.defaultFontPixelWidth * 20
property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 20
property real _middleRowWidth: ScreenTools.defaultFontPixelWidth * 16
property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 16

property Fact _camTriggerMode: controller.getParameterFact(-1, "TRIG_MODE")
property Fact _camTriggerPol: controller.getParameterFact(-1, "TRIG_POLARITY", false) // Don't bitch about missing as these only exist if trigger mode is enabled
Expand Down Expand Up @@ -147,6 +147,7 @@ QGCView {
color: palette.text
height: ScreenTools.defaultFontPixelWidth * 10
width: ScreenTools.defaultFontPixelWidth * 20
sourceSize.width: width
mipmap: true
fillMode: Image.PreserveAspectFit
source: "/qmlimages/CameraTrigger.svg"
Expand Down
1 change: 0 additions & 1 deletion src/AutoPilotPlugins/PX4/CameraComponentSummary.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ FactPanel {

Column {
anchors.fill: parent
anchors.margins: 8

VehicleSummaryRow {
labelText: qsTr("Trigger mode:")
Expand Down
1 change: 0 additions & 1 deletion src/AutoPilotPlugins/PX4/FlightModesComponentSummary.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ FactPanel {

Loader {
anchors.fill: parent
anchors.margins: 8
sourceComponent: _simpleMode ? simple : advanced
}

Expand Down
2 changes: 1 addition & 1 deletion src/AutoPilotPlugins/PX4/PX4AdvancedFlightModes.qml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Item {
anchors.left: parent.left
anchors.right: buttonColumn.left
text: topHelpText
font.pixelSize: ScreenTools.defaultFontPixelSize
font.pointSize: ScreenTools.defaultFontPointSize
wrapMode: Text.WordWrap
}

Expand Down
1 change: 0 additions & 1 deletion src/AutoPilotPlugins/PX4/PX4RadioComponentSummary.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ FactPanel {

Column {
anchors.fill: parent
anchors.margins: 8

VehicleSummaryRow {
labelText: qsTr("Roll:")
Expand Down
1 change: 1 addition & 0 deletions src/AutoPilotPlugins/PX4/PowerComponent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ QGCView {
x: voltageCol.firstColumnWidth + textEditWidth + (ScreenTools.defaultFontPixelWidth * 3)
width: height * 0.75
height: voltageCol.height
sourceSize.height: height
fillMode: Image.PreserveAspectFit
smooth: true
color: palette.text
Expand Down
1 change: 0 additions & 1 deletion src/AutoPilotPlugins/PX4/PowerComponentSummary.qml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ FactPanel {

Column {
anchors.fill: parent
anchors.margins: 8

VehicleSummaryRow {
labelText: qsTr("Battery Full:")
Expand Down
Loading

0 comments on commit 779d970

Please sign in to comment.