Commit 32471f91 authored by dogmaphobic's avatar dogmaphobic

Done with Mac OS

parent 6abc3443
...@@ -124,7 +124,7 @@ QGCFlickable { ...@@ -124,7 +124,7 @@ QGCFlickable {
QGCLabel { QGCLabel {
width: parent.width width: parent.width
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
font.pointSize: ScreenTools.smallFontPointSize * 0.75 font.pointSize: ScreenTools.isTinyScreen ? ScreenTools.smallFontPointSize * 0.75 : ScreenTools.smallFontPointSize
fontSizeMode: Text.HorizontalFit fontSizeMode: Text.HorizontalFit
color: textColor color: textColor
text: fact.shortDescription text: fact.shortDescription
...@@ -139,7 +139,7 @@ QGCFlickable { ...@@ -139,7 +139,7 @@ QGCFlickable {
QGCLabel { QGCLabel {
width: parent.width width: parent.width
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
font.pointSize: ScreenTools.smallFontPointSize * 0.75 font.pointSize: ScreenTools.isTinyScreen ? ScreenTools.smallFontPointSize * 0.75 : ScreenTools.smallFontPointSize
fontSizeMode: Text.HorizontalFit fontSizeMode: Text.HorizontalFit
color: textColor color: textColor
text: fact.units text: fact.units
...@@ -247,7 +247,7 @@ QGCFlickable { ...@@ -247,7 +247,7 @@ QGCFlickable {
QGCCheckBox { QGCCheckBox {
id: _addCheckBox id: _addCheckBox
text: factGroup.getFact(modelData).shortDescription text: factGroup.getFact(modelData).shortDescription
checked: _largeCheckBox.checked || listContains(controller.smallValues, propertyName) checked: listContains(controller.smallValues, propertyName) || _largeCheckBox.checked
onClicked: updateValues() onClicked: updateValues()
Layout.fillWidth: true Layout.fillWidth: true
Layout.minimumWidth: ScreenTools.defaultFontPixelWidth * 20 Layout.minimumWidth: ScreenTools.defaultFontPixelWidth * 20
...@@ -267,12 +267,10 @@ QGCFlickable { ...@@ -267,12 +267,10 @@ QGCFlickable {
Repeater { Repeater {
model: factGroup ? factGroup.factGroupNames : 0 model: factGroup ? factGroup.factGroupNames : 0
Loader { Loader {
sourceComponent: factGroupList sourceComponent: factGroupList
property var factGroup: _root ? _root.parent.factGroup.getFactGroup(modelData) : undefined 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 : ""
} }
} }
} }
......
...@@ -12,7 +12,7 @@ Button { ...@@ -12,7 +12,7 @@ Button {
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
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 // 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 // move the mouse fast enough such that the MouseArea does not trigger an onExited. This is turn
...@@ -43,7 +43,7 @@ Button { ...@@ -43,7 +43,7 @@ Button {
repeat: true repeat: true
onTriggered: { onTriggered: {
__forceHoverOff = (__lastGlobalMouseX != ScreenTools.mouseX() || __lastGlobalMouseY != ScreenTools.mouseY()); __forceHoverOff = (__lastGlobalMouseX !== ScreenTools.mouseX() || __lastGlobalMouseY !== ScreenTools.mouseY());
} }
} }
...@@ -52,15 +52,15 @@ Button { ...@@ -52,15 +52,15 @@ Button {
padding { padding {
top: 4 top: 4
left: 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 bottom: 4
} }
/*! This defines the background of the button. */ /*! This defines the background of the 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(ScreenTools.defaultFontPixelWidth * 4.5)
implicitHeight: Math.max(25, Math.round(TextSingleton.implicitHeight * 1.2)) implicitHeight: Math.max(25, Math.round(ScreenTools.defaultFontPixelHeight * 1.2))
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
......
...@@ -18,8 +18,8 @@ ComboBox { ...@@ -18,8 +18,8 @@ ComboBox {
control._qgcPal.buttonText control._qgcPal.buttonText
background: Item { background: Item {
implicitWidth: Math.round(TextSingleton.implicitHeight * 4.5) implicitWidth: Math.round(ScreenTools.defaultFontPixelWidth * 4.5)
implicitHeight: Math.max(25, Math.round(TextSingleton.implicitHeight * 1.2)) implicitHeight: Math.max(25, Math.round(ScreenTools.defaultFontPixelHeight * 1.2))
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
......
...@@ -20,7 +20,7 @@ TextField { ...@@ -20,7 +20,7 @@ TextField {
property var __qgcPal: QGCPalette { colorGroupEnabled: enabled } property var __qgcPal: QGCPalette { colorGroupEnabled: enabled }
textColor: __qgcPal.textFieldText textColor: __qgcPal.textFieldText
height: Math.max(25, Math.round(unitsLabel.implicitHeight * 1.2)) height: Math.max(25, Math.round(ScreenTools.defaultFontPixelHeight * 1.2))
Label { Label {
id: unitsLabelWidthGenerator id: unitsLabelWidthGenerator
......
...@@ -53,9 +53,9 @@ Rectangle { ...@@ -53,9 +53,9 @@ Rectangle {
property real savedZoom: 3 property real savedZoom: 3
property string savedMapType: "" 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 _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 oldlon0: 0
property real oldlon1: 0 property real oldlon1: 0
...@@ -1089,17 +1089,17 @@ Rectangle { ...@@ -1089,17 +1089,17 @@ Rectangle {
Item { Item {
Layout.columnSpan: 2 Layout.columnSpan: 2
Layout.fillWidth: true Layout.fillWidth: true
implicitHeight: ScreenTools.defaultFontPixelHeight * 1.5 height: ScreenTools.defaultFontPixelHeight * 1.5
QGCLabel { QGCLabel {
anchors.centerIn: parent anchors.centerIn: parent
text: qsTr("Memory cache changes require a restart to take effect.") text: qsTr("Memory cache changes require a restart to take effect.")
font.pointSize: ScreenTools.defaultFontPointSize * 0.85 font.pointSize: ScreenTools.smallFontPointSize
} }
} }
Rectangle { Rectangle {
Layout.columnSpan: 2 Layout.columnSpan: 2
Layout.fillWidth: true Layout.fillWidth: true
implicitHeight: 1 height: 1
color: qgcPal.text color: qgcPal.text
} }
QGCLabel { QGCLabel {
...@@ -1107,18 +1107,17 @@ Rectangle { ...@@ -1107,18 +1107,17 @@ Rectangle {
} }
QGCTextField { QGCTextField {
id: mapBoxToken id: mapBoxToken
Layout.fillWidth: true
maximumLength: 256 maximumLength: 256
implicitWidth : ScreenTools.defaultFontPixelWidth * 30 width: ScreenTools.defaultFontPixelWidth * 30
} }
Item { Item {
Layout.columnSpan: 2 Layout.columnSpan: 2
Layout.fillWidth: true Layout.fillWidth: true
implicitHeight: ScreenTools.defaultFontPixelHeight * 1.5 height: ScreenTools.defaultFontPixelHeight * 1.5
QGCLabel { QGCLabel {
anchors.centerIn: parent anchors.centerIn: parent
text: qsTr("With an access token, you can use MapBox Maps.") text: qsTr("With an access token, you can use MapBox Maps.")
font.pointSize: ScreenTools.defaultFontPointSize * 0.85 font.pointSize: ScreenTools.smallFontPointSize
} }
} }
} }
......
...@@ -39,7 +39,7 @@ Rectangle { ...@@ -39,7 +39,7 @@ Rectangle {
anchors.leftMargin: ScreenTools.defaultFontPixelWidth anchors.leftMargin: ScreenTools.defaultFontPixelWidth
color: qgcPal.window color: qgcPal.window
property real _minSummaryW: ScreenTools.defaultFontPixelWidth * 42 property real _minSummaryW: ScreenTools.defaultFontPixelWidth * 36
property real _summaryBoxWidth: _minSummaryW property real _summaryBoxWidth: _minSummaryW
property real _summaryBoxSpace: ScreenTools.defaultFontPixelWidth * 2 property real _summaryBoxSpace: ScreenTools.defaultFontPixelWidth * 2
......
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