diff --git a/src/FlightMap/Widgets/ValuesWidget.qml b/src/FlightMap/Widgets/ValuesWidget.qml index 8d3e5f9f770a145204f1b67abf6c3fbd63948ce5..e2c5ed1a96dc92f1e340c729fb43a1220a48a503 100644 --- a/src/FlightMap/Widgets/ValuesWidget.qml +++ b/src/FlightMap/Widgets/ValuesWidget.qml @@ -124,7 +124,7 @@ QGCFlickable { QGCLabel { width: parent.width horizontalAlignment: Text.AlignHCenter - font.pointSize: ScreenTools.smallFontPointSize * 0.75 + font.pointSize: ScreenTools.isTinyScreen ? ScreenTools.smallFontPointSize * 0.75 : ScreenTools.smallFontPointSize fontSizeMode: Text.HorizontalFit color: textColor text: fact.shortDescription @@ -139,7 +139,7 @@ QGCFlickable { QGCLabel { width: parent.width horizontalAlignment: Text.AlignHCenter - font.pointSize: ScreenTools.smallFontPointSize * 0.75 + font.pointSize: ScreenTools.isTinyScreen ? ScreenTools.smallFontPointSize * 0.75 : ScreenTools.smallFontPointSize fontSizeMode: Text.HorizontalFit color: textColor text: fact.units @@ -245,20 +245,20 @@ QGCFlickable { } QGCCheckBox { - id: _addCheckBox - text: factGroup.getFact(modelData).shortDescription - checked: _largeCheckBox.checked || listContains(controller.smallValues, propertyName) - onClicked: updateValues() + id: _addCheckBox + text: factGroup.getFact(modelData).shortDescription + checked: listContains(controller.smallValues, propertyName) || _largeCheckBox.checked + onClicked: updateValues() Layout.fillWidth: true Layout.minimumWidth: ScreenTools.defaultFontPixelWidth * 20 } QGCCheckBox { - id: _largeCheckBox - text: qsTr("Large") - checked: listContains(controller.largeValues, propertyName) - enabled: _addCheckBox.checked - onClicked: updateValues() + id: _largeCheckBox + text: qsTr("Large") + checked: listContains(controller.largeValues, propertyName) + enabled: _addCheckBox.checked + onClicked: updateValues() } } } @@ -267,12 +267,10 @@ QGCFlickable { Repeater { model: factGroup ? factGroup.factGroupNames : 0 - Loader { sourceComponent: factGroupList - property var factGroup: _root ? _root.parent.factGroup.getFactGroup(modelData) : undefined - property string factGroupName: _root ? _root.parent.factGroupName + "." + modelData : undefined + property string factGroupName: _root ? _root.parent.factGroupName + "." + modelData : "" } } } diff --git a/src/QmlControls/QGCButton.qml b/src/QmlControls/QGCButton.qml index 3454e0cfba3e4b94cfcc5c0fc1df291b4d3a705c..b9b5e186723bc2d362764b947a6a39edac27afc9 100644 --- a/src/QmlControls/QGCButton.qml +++ b/src/QmlControls/QGCButton.qml @@ -12,7 +12,7 @@ Button { property var _qgcPal: QGCPalette { colorGroupEnabled: enabled } property bool _showHighlight: (pressed | hovered | checked) && !__forceHoverOff - property bool _showBorder: _qgcPal.globalTheme == QGCPalette.Light + property bool _showBorder: _qgcPal.globalTheme === QGCPalette.Light // This fixes the issue with button hover where if a Button is near the edge oa QQuickWidget you can // move the mouse fast enough such that the MouseArea does not trigger an onExited. This is turn @@ -43,7 +43,7 @@ Button { repeat: true onTriggered: { - __forceHoverOff = (__lastGlobalMouseX != ScreenTools.mouseX() || __lastGlobalMouseY != ScreenTools.mouseY()); + __forceHoverOff = (__lastGlobalMouseX !== ScreenTools.mouseX() || __lastGlobalMouseY !== ScreenTools.mouseY()); } } @@ -52,15 +52,15 @@ Button { padding { top: 4 left: 4 - right: control.menu !== null ? Math.round(TextSingleton.implicitHeight * 0.5) : 4 + right: control.menu !== null ? Math.round(ScreenTools.defaultFontPixelHeight * 0.5) : 4 bottom: 4 } /*! This defines the background of the button. */ background: Item { property bool down: control.pressed || (control.checkable && control.checked) - implicitWidth: Math.round(TextSingleton.implicitHeight * 4.5) - implicitHeight: Math.max(25, Math.round(TextSingleton.implicitHeight * 1.2)) + implicitWidth: Math.round(ScreenTools.defaultFontPixelWidth * 4.5) + implicitHeight: Math.max(25, Math.round(ScreenTools.defaultFontPixelHeight * 1.2)) Rectangle { anchors.fill: parent diff --git a/src/QmlControls/QGCComboBox.qml b/src/QmlControls/QGCComboBox.qml index f91a12d5a597189a0419b0af209dea8c963c6246..032136aace4661208a5912b4882cbe72030414a6 100644 --- a/src/QmlControls/QGCComboBox.qml +++ b/src/QmlControls/QGCComboBox.qml @@ -18,8 +18,8 @@ ComboBox { control._qgcPal.buttonText background: Item { - implicitWidth: Math.round(TextSingleton.implicitHeight * 4.5) - implicitHeight: Math.max(25, Math.round(TextSingleton.implicitHeight * 1.2)) + implicitWidth: Math.round(ScreenTools.defaultFontPixelWidth * 4.5) + implicitHeight: Math.max(25, Math.round(ScreenTools.defaultFontPixelHeight * 1.2)) Rectangle { anchors.fill: parent diff --git a/src/QmlControls/QGCTextField.qml b/src/QmlControls/QGCTextField.qml index 1f6990bb943419601f38a6dbc2237c0883d44c66..bd652405b8d1c0d56facb72eb9b814f59dcce3ef 100644 --- a/src/QmlControls/QGCTextField.qml +++ b/src/QmlControls/QGCTextField.qml @@ -20,7 +20,7 @@ TextField { property var __qgcPal: QGCPalette { colorGroupEnabled: enabled } textColor: __qgcPal.textFieldText - height: Math.max(25, Math.round(unitsLabel.implicitHeight * 1.2)) + height: Math.max(25, Math.round(ScreenTools.defaultFontPixelHeight * 1.2)) Label { id: unitsLabelWidthGenerator diff --git a/src/QtLocationPlugin/QMLControl/OfflineMap.qml b/src/QtLocationPlugin/QMLControl/OfflineMap.qml index 75da0332e1f0df24671a30c132f3ecfb64cc1641..70607cb92d83f4e1b755edacf7a46ca3d77dfaf1 100644 --- a/src/QtLocationPlugin/QMLControl/OfflineMap.qml +++ b/src/QtLocationPlugin/QMLControl/OfflineMap.qml @@ -40,9 +40,9 @@ Rectangle { anchors.fill: parent anchors.margins: ScreenTools.defaultFontPixelWidth - property var _currentSelection: null + property var _currentSelection: null - property string mapKey: "lastMapType" + property string mapKey: "lastMapType" property string mapType: QGroundControl.mapEngineManager.loadSetting(mapKey, "Google Street Map") property int mapMargin: (ScreenTools.defaultFontPixelHeight * 0.2).toFixed(0) @@ -53,9 +53,9 @@ Rectangle { property real savedZoom: 3 property string savedMapType: "" - property real _newSetMiddleLabel: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelWidth * 10 : ScreenTools.defaultFontPixelWidth * 14 + property real _newSetMiddleLabel: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelWidth * 10 : ScreenTools.defaultFontPixelWidth * 12 property real _newSetMiddleField: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelWidth * 16 : ScreenTools.defaultFontPixelWidth * 20 - property real _netSetSliderWidth: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelWidth * 8 : ScreenTools.defaultFontPixelWidth * 14 + property real _netSetSliderWidth: ScreenTools.isTinyScreen ? ScreenTools.defaultFontPixelWidth * 8 : ScreenTools.defaultFontPixelWidth * 16 property real oldlon0: 0 property real oldlon1: 0 @@ -1056,7 +1056,7 @@ Rectangle { } Rectangle { id: optionsRect - width: optionsGrid.width + (ScreenTools.defaultFontPixelWidth * 4) + width: optionsGrid.width + (ScreenTools.defaultFontPixelWidth * 4) height: optionsGrid.height + (ScreenTools.defaultFontPixelHeight * 4) color: qgcPal.window radius: ScreenTools.defaultFontPixelHeight * 0.5 @@ -1089,17 +1089,17 @@ Rectangle { Item { Layout.columnSpan: 2 Layout.fillWidth: true - implicitHeight: ScreenTools.defaultFontPixelHeight * 1.5 + height: ScreenTools.defaultFontPixelHeight * 1.5 QGCLabel { anchors.centerIn: parent text: qsTr("Memory cache changes require a restart to take effect.") - font.pointSize: ScreenTools.defaultFontPointSize * 0.85 + font.pointSize: ScreenTools.smallFontPointSize } } Rectangle { Layout.columnSpan: 2 Layout.fillWidth: true - implicitHeight: 1 + height: 1 color: qgcPal.text } QGCLabel { @@ -1107,18 +1107,17 @@ Rectangle { } QGCTextField { id: mapBoxToken - Layout.fillWidth: true maximumLength: 256 - implicitWidth : ScreenTools.defaultFontPixelWidth * 30 + width: ScreenTools.defaultFontPixelWidth * 30 } Item { Layout.columnSpan: 2 Layout.fillWidth: true - implicitHeight: ScreenTools.defaultFontPixelHeight * 1.5 + height: ScreenTools.defaultFontPixelHeight * 1.5 QGCLabel { anchors.centerIn: parent text: qsTr("With an access token, you can use MapBox Maps.") - font.pointSize: ScreenTools.defaultFontPointSize * 0.85 + font.pointSize: ScreenTools.smallFontPointSize } } } diff --git a/src/VehicleSetup/VehicleSummary.qml b/src/VehicleSetup/VehicleSummary.qml index ae430eccf12e05e8f6d435b6092a3cbdbfea4318..cdf5432afe07f005e6cc4d1b1a71409874c1d848 100644 --- a/src/VehicleSetup/VehicleSummary.qml +++ b/src/VehicleSetup/VehicleSummary.qml @@ -39,7 +39,7 @@ Rectangle { anchors.leftMargin: ScreenTools.defaultFontPixelWidth color: qgcPal.window - property real _minSummaryW: ScreenTools.defaultFontPixelWidth * 42 + property real _minSummaryW: ScreenTools.defaultFontPixelWidth * 36 property real _summaryBoxWidth: _minSummaryW property real _summaryBoxSpace: ScreenTools.defaultFontPixelWidth * 2