Commit da099c28 authored by Don Gagne's avatar Don Gagne

Merge pull request #1412 from DonLakeFlyer/FunWithFonts

Font's are now correctly and equally size across all OS
parents 806f3188 0ac27416
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* { * {
background-color: #222; background-color: #222;
color: #FFF; color: #FFF;
font-size: 11px; font-size: 12pt;
} }
QWidget#viewModeWidget { QWidget#viewModeWidget {
...@@ -105,138 +105,6 @@ QGCMAVLinkLogPlayer QLabel:disabled { ...@@ -105,138 +105,6 @@ QGCMAVLinkLogPlayer QLabel:disabled {
color: #AAA; color: #AAA;
} }
QGCToolBar {
border-top-color: #969696;
border-bottom-color: #484848;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #4B4B4B, stop: 0.3 #404040, stop: 0.34 #383838, stop:1 #181818);
padding: 0;
margin: 0;
}
QGCToolBar QLabel {
font-size: 12pt;
font-weight: bold;
margin: 4px 2px;
padding: 0 2px;
border-radius: 4px;
}
QGCToolBar QLabel#toolBarBatteryBar {
color: #0F0;
}
QGCToolBar QLabel#toolBarTimeoutLabel {
color: #FFFFFF;
background-color: #FF0037;
font-size: 15pt;
}
QGCToolBar QLabel#toolBarSafetyLabel {
/* color is for this label defined within the code */
font-size: 15pt;
}
QGCToolBar QLabel#toolBarModeLabel {
color: #ACEBFE;
font-size: 15pt;
}
QGCToolBar QLabel#toolBarStateLabel {
color: #FEC654;
font-size: 15pt;
}
QGCToolBar QLabel#toolBarBatteryVoltageLabel {
color: #0F0;
font-size: 15pt;
}
QGCToolBar QLabel#toolBarWpLabel {
color: #ACEBFE;
font-size: 15pt;
}
QGCToolBar QLabel#toolBarMessageLabel {
color: #ACEBFE;
}
QGCToolBar QProgressBar {
margin: 4px 2px;
}
QGCToolBar QToolButton {
margin: 0;
padding: 0 2px;
border: none;
border-top: 1px solid #333;
border-bottom: 1px solid #333;
border-radius: 0;
height: 24px;
min-width: 30px;
margin-bottom: 4px;
text-align: left;
font-weight: bold;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #AAA, stop: 1 #BBB);
color: #000;
}
QGCToolBar QToolButton:checked, QGCToolBar QToolButton:pressed, QGCToolBar QToolButton:checked:hover {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #555, stop: 1 #777);
color: #FFF;
}
QGCToolBar QToolButton:hover {
color: #FFF;
}
QGCToolBar QToolButton#advancedButton {
margin-left: 0;
margin-right: 13px;
padding-right: 10px;
border-radius: 0;
border-bottom-right-radius: 6px;
border-top-right-radius: 6px;
border-left: none;
}
QGCToolBar QToolButton#firstAction {
margin-left: 2px;
border-bottom-left-radius: 6px;
border-top-left-radius: 6px;
border-right: none;
}
QGCToolBar .QWidget {
margin: 0;
background-color: transparent;
}
QGCPX4SensorCalibration QLabel#magLabel {
font-size: 15pt;
font-weight: bold;
border-radius: 4px;
min-height: 25px;
}
QGCPX4SensorCalibration QLabel#gyroLabel {
font-size: 15pt;
font-weight: bold;
border-radius: 4px;
min-height: 25px;
}
QGCPX4SensorCalibration QLabel#accelLabel {
font-size: 15pt;
font-weight: bold;
border-radius: 4px;
min-height: 25px;
}
QGCPX4VehicleConfig QLabel#rcLabel {
color: #FEC654;
font-size: 18pt;
}
QGCToolWidgetItem { QGCToolWidgetItem {
border: 1px solid #666; border: 1px solid #666;
border-radius: 3px; border-radius: 3px;
...@@ -284,19 +152,11 @@ QLabel#noUas { ...@@ -284,19 +152,11 @@ QLabel#noUas {
font-size: 30pt; font-size: 30pt;
} }
QMessageBox QLabel {
font-size: 14pt;
}
QMessageBox { QMessageBox {
min-width: 400px; min-width: 400px;
min-height: 300px; min-height: 300px;
} }
QLabel#calibrationExplanationLabel {
font-size: 20pt;
}
QLabel#tabTitleLabel { QLabel#tabTitleLabel {
font-size: 28pt; font-size: 28pt;
font-weight: lighter; font-weight: lighter;
......
...@@ -88,61 +88,6 @@ QGCMAVLinkLogPlayer QLabel:disabled { ...@@ -88,61 +88,6 @@ QGCMAVLinkLogPlayer QLabel:disabled {
color: #666; color: #666;
} }
QGCToolBar {
border-top-color: #969696;
border-bottom-color: #484848;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #DDD, stop: 1 #999);
}
QGCToolBar QLabel#toolBarBatteryBar {
color: #008000;
}
QGCToolBar QLabel#toolBarTimeoutLabel {
color: #FFFFFF;
background-color: #FF0037;
}
QGCToolBar QLabel#toolBarModeLabel {
color: #475E66;
}
QGCToolBar QLabel#toolBarStateLabel {
color: #80632A;
}
QGCToolBar QLabel#toolBarBatteryVoltageLabel {
color: #008000;
}
QGCToolBar QLabel#toolBarWpLabel {
color: #475E66;
}
QGCToolBar QLabel#toolBarMessageLabel {
color: #475E66;
}
QGCToolBar QToolButton {
border-top: #DDD;
border-bottom: #DDD;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #333, stop: 1 #444);
color: #FFF;
}
QGCToolBar QToolButton:checked, QGCToolBar QToolButton:pressed, QGCToolBar QToolButton:checked:hover {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #777, stop: 1 #999);
color: #FFF;
}
QGCToolBar QToolButton:hover {
color: #000;
}
QGCToolBar .QWidget {
background-color: transparent;
}
QGCToolWidgetItem { QGCToolWidgetItem {
border-color: #666; border-color: #666;
} }
......
...@@ -197,12 +197,10 @@ Rectangle { ...@@ -197,12 +197,10 @@ Rectangle {
text: "Battery Max:" text: "Battery Max:"
color: palette.text color: palette.text
width: 80 width: 80
font.pointSize: screenTools.dpiAdjustedPointSize(12);
} }
QGCLabel { QGCLabel {
text: (battNumCells.value * battHighVolt.value).toFixed(1) + ' V' text: (battNumCells.value * battHighVolt.value).toFixed(1) + ' V'
color: palette.text color: palette.text
font.pointSize: screenTools.dpiAdjustedPointSize(12);
} }
} }
Row { Row {
...@@ -211,12 +209,10 @@ Rectangle { ...@@ -211,12 +209,10 @@ Rectangle {
text: "Battery Min:" text: "Battery Min:"
color: palette.text color: palette.text
width: 80 width: 80
font.pointSize: screenTools.dpiAdjustedPointSize(12);
} }
QGCLabel { QGCLabel {
text: (battNumCells.value * battLowVolt.value).toFixed(1) + ' V' text: (battNumCells.value * battLowVolt.value).toFixed(1) + ' V'
color: palette.text color: palette.text
font.pointSize: screenTools.dpiAdjustedPointSize(12);
} }
} }
} }
......
...@@ -567,8 +567,32 @@ void QGCApplication::_loadCurrentStyle(void) ...@@ -567,8 +567,32 @@ void QGCApplication::_loadCurrentStyle(void)
} }
} }
if (!styles.isEmpty()) { // Now that we have the styles loaded we need to dpi adjust the font point sizes
setStyleSheet(styles);
QString dpiAdjustedStyles;
if (success) {
QTextStream styleStream(&styles, QIODevice::ReadOnly);
QRegularExpression regex("font-size:.+(\\d\\d)pt;");
while (!styleStream.atEnd()) {
QString adjustedLine;
QString line = styleStream.readLine();
QRegularExpressionMatch match = regex.match(line);
if (match.hasMatch()) {
//qDebug() << "found:" << line << match.captured(1);
adjustedLine = QString("font-size: %1pt;").arg(ScreenTools::dpiAdjustedPointSize_s(match.captured(1).toDouble()));
//qDebug() << "adjusted:" << adjustedLine;
} else {
adjustedLine = line;
}
dpiAdjustedStyles += adjustedLine;
}
}
if (!dpiAdjustedStyles.isEmpty()) {
setStyleSheet(dpiAdjustedStyles);
} }
if (!success) { if (!success) {
......
...@@ -25,10 +25,13 @@ ...@@ -25,10 +25,13 @@
/// @author Don Gagne <don@thegagnes.com> /// @author Don Gagne <don@thegagnes.com>
#include "QGCPalette.h" #include "QGCPalette.h"
#include "ScreenTools.h"
#include <QApplication> #include <QApplication>
#include <QPalette> #include <QPalette>
const qreal QGCPalette::_defaultFontPointSize = 12;
QList<QGCPalette*> QGCPalette::_paletteObjects; QList<QGCPalette*> QGCPalette::_paletteObjects;
QGCPalette::Theme QGCPalette::_theme = QGCPalette::Dark; QGCPalette::Theme QGCPalette::_theme = QGCPalette::Dark;
...@@ -130,3 +133,8 @@ void QGCPalette::_themeChanged(void) ...@@ -130,3 +133,8 @@ void QGCPalette::_themeChanged(void)
{ {
emit paletteChanged(); emit paletteChanged();
} }
qreal QGCPalette::dpiAdjustedDefaultFontPointSize(void)
{
return ScreenTools::dpiAdjustedPointSize_s(_defaultFontPointSize);
}
...@@ -83,6 +83,10 @@ class QGCPalette : public QObject ...@@ -83,6 +83,10 @@ class QGCPalette : public QObject
// Text color for TextFields // Text color for TextFields
Q_PROPERTY(QColor textFieldText READ textFieldText NOTIFY paletteChanged) Q_PROPERTY(QColor textFieldText READ textFieldText NOTIFY paletteChanged)
Q_PROPERTY(qreal defaultFontPointSize MEMBER _defaultFontPointSize CONSTANT)
Q_PROPERTY(qreal dpiAdjustedDefaultFontPointSize READ dpiAdjustedDefaultFontPointSize CONSTANT)
public: public:
enum ColorGroup { enum ColorGroup {
Disabled = 0, Disabled = 0,
...@@ -120,6 +124,8 @@ public: ...@@ -120,6 +124,8 @@ public:
static Theme globalTheme(void) { return _theme; } static Theme globalTheme(void) { return _theme; }
static void setGlobalTheme(Theme newTheme); static void setGlobalTheme(Theme newTheme);
qreal dpiAdjustedDefaultFontPointSize(void);
signals: signals:
void paletteChanged(void); void paletteChanged(void);
...@@ -149,6 +155,8 @@ private: ...@@ -149,6 +155,8 @@ private:
static QColor _textField[_cThemes][_cColorGroups]; static QColor _textField[_cThemes][_cColorGroups];
static QColor _textFieldText[_cThemes][_cColorGroups]; static QColor _textFieldText[_cThemes][_cColorGroups];
static const qreal _defaultFontPointSize;
void _themeChanged(void); void _themeChanged(void);
static QList<QGCPalette*> _paletteObjects; ///< List of all active QGCPalette objects static QList<QGCPalette*> _paletteObjects; ///< List of all active QGCPalette objects
......
...@@ -105,8 +105,11 @@ Button { ...@@ -105,8 +105,11 @@ Button {
Text { Text {
id: text id: text
renderType: Text.NativeRendering renderType: Text.NativeRendering
anchors.verticalCenter: parent.verticalCenter
text: control.text text: control.text
font.pointSize: __qgcPal.dpiAdjustedDefaultFontPointSize
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)
......
...@@ -27,7 +27,10 @@ CheckBox { ...@@ -27,7 +27,10 @@ CheckBox {
Text { Text {
id: text id: text
text: control.text text: control.text
font.pointSize: __qgcPal.dpiAdjustedDefaultFontPointSize
anchors.centerIn: parent anchors.centerIn: parent
color: control.__qgcPal.text color: control.__qgcPal.text
} }
} }
......
...@@ -11,6 +11,7 @@ ComboBox { ...@@ -11,6 +11,7 @@ ComboBox {
property bool __showHighlight: pressed | hovered property bool __showHighlight: pressed | hovered
style: ComboBoxStyle { style: ComboBoxStyle {
font.pointSize: __qgcPal.dpiAdjustedDefaultFontPointSize
textColor: __showHighlight ? textColor: __showHighlight ?
control.__qgcPal.buttonHighlightText : control.__qgcPal.buttonHighlightText :
control.__qgcPal.buttonText control.__qgcPal.buttonText
......
...@@ -5,8 +5,10 @@ import QtQuick.Controls.Styles 1.2 ...@@ -5,8 +5,10 @@ import QtQuick.Controls.Styles 1.2
import QGroundControl.Palette 1.0 import QGroundControl.Palette 1.0
Text { Text {
property var __palette: QGCPalette { colorGroupEnabled: enabled } QGCPalette { id: __qgcPal; colorGroupEnabled: enabled }
property bool enabled: true property bool enabled: true
color: __palette.text font.pointSize: __qgcPal.dpiAdjustedDefaultFontPointSize
color: __qgcPal.text
} }
...@@ -27,7 +27,10 @@ RadioButton { ...@@ -27,7 +27,10 @@ RadioButton {
Text { Text {
id: text id: text
text: control.text text: control.text
font.pointSize: __qgcPal.dpiAdjustedDefaultFontPointSize
anchors.centerIn: parent anchors.centerIn: parent
color: control.__qgcPal.text color: control.__qgcPal.text
} }
} }
......
...@@ -49,6 +49,8 @@ TextField { ...@@ -49,6 +49,8 @@ TextField {
width: unitsLabelWidthGenerator.width width: unitsLabelWidthGenerator.width
text: control.unitsLabel text: control.unitsLabel
font.pointSize: __qgcPal.dpiAdjustedDefaultFontPointSize
color: control.textColor color: control.textColor
visible: control.showUnits visible: control.showUnits
} }
......
...@@ -53,6 +53,7 @@ QGCButton { ...@@ -53,6 +53,7 @@ QGCButton {
} }
label: Label { label: Label {
text: button.text text: button.text
font.pointSize: __qgcPal.dpiAdjustedDefaultFontPointSize
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
color: showHighlight ? __qgcPal.buttonHighlightText : (button.checked ? __qgcPal.primaryButtonText : __qgcPal.buttonText) color: showHighlight ? __qgcPal.buttonHighlightText : (button.checked ? __qgcPal.primaryButtonText : __qgcPal.buttonText)
......
...@@ -27,10 +27,34 @@ ...@@ -27,10 +27,34 @@
#include "ScreenTools.h" #include "ScreenTools.h"
#include "MainWindow.h" #include "MainWindow.h"
#include <QFont>
#include <QFontMetrics>
bool ScreenTools::_dpiFactorSet = false;
double ScreenTools::_dotsPerInch = 96.0;
double ScreenTools::_dpiFactor = 72.0 / 96.0;
ScreenTools::ScreenTools() ScreenTools::ScreenTools()
: _dotsPerInch(96.0)
, _dpiFactor( 72.0 / 96.0)
{ {
connect(MainWindow::instance(), &MainWindow::repaintCanvas, this, &ScreenTools::_updateCanvas);
}
qreal ScreenTools::dpiAdjustedPointSize(qreal pointSize)
{
return dpiAdjustedPointSize_s(pointSize);
}
qreal ScreenTools::dpiAdjustedPointSize_s(qreal pointSize)
{
_setDpiFactor();
return pointSize * _dpiFactor;
}
void ScreenTools::_setDpiFactor(void)
{
if (!_dpiFactorSet) {
_dpiFactorSet = true;
// Get screen DPI to manage font sizes on different platforms // Get screen DPI to manage font sizes on different platforms
QScreen *srn = QGuiApplication::primaryScreen(); QScreen *srn = QGuiApplication::primaryScreen();
if(srn && srn->logicalDotsPerInch() > 50.0) { if(srn && srn->logicalDotsPerInch() > 50.0) {
...@@ -39,12 +63,7 @@ ScreenTools::ScreenTools() ...@@ -39,12 +63,7 @@ ScreenTools::ScreenTools()
} else { } else {
qWarning() << "System not reporting logical DPI, which is used to compute the appropriate font size. The default being used is 96dpi. If the text within buttons and UI elements are too big or too small, that's the reason."; qWarning() << "System not reporting logical DPI, which is used to compute the appropriate font size. The default being used is 96dpi. If the text within buttons and UI elements are too big or too small, that's the reason.";
} }
connect(MainWindow::instance(), &MainWindow::repaintCanvas, this, &ScreenTools::_updateCanvas); }
}
qreal ScreenTools::dpiAdjustedPointSize(qreal pointSize)
{
return pointSize * _dpiFactor;
} }
void ScreenTools::_updateCanvas() void ScreenTools::_updateCanvas()
......
...@@ -116,6 +116,9 @@ public: ...@@ -116,6 +116,9 @@ public:
*/ */
Q_INVOKABLE qreal dpiAdjustedPointSize(qreal pointSize); Q_INVOKABLE qreal dpiAdjustedPointSize(qreal pointSize);
/// Static version of dpiAdjustedPointSize of use in C++ code
static qreal dpiAdjustedPointSize_s(qreal pointSize);
double screenDPI () { return _dotsPerInch; } double screenDPI () { return _dotsPerInch; }
double dpiFactor () { return _dpiFactor; } double dpiFactor () { return _dpiFactor; }
int mouseX () { return QCursor::pos().x(); } int mouseX () { return QCursor::pos().x(); }
...@@ -129,9 +132,11 @@ private slots: ...@@ -129,9 +132,11 @@ private slots:
void _updateCanvas(); void _updateCanvas();
private: private:
double _dotsPerInch; static void _setDpiFactor(void);
double _dpiFactor;
static bool _dpiFactorSet;
static double _dotsPerInch;
static double _dpiFactor;
}; };
#endif #endif
...@@ -39,7 +39,7 @@ Button { ...@@ -39,7 +39,7 @@ Button {
horizontalAlignment: TextEdit.AlignHCenter horizontalAlignment: TextEdit.AlignHCenter
text: control.text text: control.text
font.pixelSize: 12 font.pointSize: __qgcPal.dpiAdjustedDefaultFontPointSize
color: __showHighlight ? __qgcPal.buttonHighlightText : __qgcPal.buttonText color: __showHighlight ? __qgcPal.buttonHighlightText : __qgcPal.buttonText
Rectangle { Rectangle {
......
...@@ -30,7 +30,7 @@ import QGroundControl.ScreenTools 1.0 ...@@ -30,7 +30,7 @@ import QGroundControl.ScreenTools 1.0
Rectangle { Rectangle {
property var __qgcPal: QGCPalette { colorGroupEnabled: enabled } property var __qgcPal: QGCPalette { colorGroupEnabled: enabled }
property ScreenTools screenTools: ScreenTools { } property ScreenTools __screenTools: ScreenTools { }
// Indicates whether calibration is valid for this control // Indicates whether calibration is valid for this control
property bool calValid: false property bool calValid: false
...@@ -63,23 +63,23 @@ Rectangle { ...@@ -63,23 +63,23 @@ Rectangle {
smooth: true smooth: true
} }
Label { QGCLabel {
width: parent.width width: parent.width
height: parent.height height: parent.height
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignBottom verticalAlignment: Text.AlignBottom
font.pointSize: screenTools.dpiAdjustedPointSize(25); font.pointSize: __screenTools.dpiAdjustedPointSize(25);
font.bold: true font.bold: true
color: "black" color: "black"
text: parent.calText text: parent.calText
} }
Label { QGCLabel {
width: parent.width width: parent.width
height: parent.height height: parent.height
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignBottom verticalAlignment: Text.AlignBottom
font.pointSize: screenTools.dpiAdjustedPointSize(25); font.pointSize: __screenTools.dpiAdjustedPointSize(25);
color: calInProgress ? "yellow" : "white" color: calInProgress ? "yellow" : "white"
text: parent.calText text: parent.calText
......
...@@ -114,11 +114,15 @@ Rectangle { ...@@ -114,11 +114,15 @@ Rectangle {
TextArea { TextArea {
id: statusTextArea id: statusTextArea
width: parent.width width: parent.width
height: 300 height: 300
readOnly: true readOnly: true
frameVisible: false frameVisible: false
font.pointSize: qgcPal.dpiAdjustedDefaultFontPointSize
text: qsTr("Please disconnect all connections and unplug board from USB before selecting Upgrade.") text: qsTr("Please disconnect all connections and unplug board from USB before selecting Upgrade.")
style: TextAreaStyle { style: TextAreaStyle {
textColor: qgcPal.text textColor: qgcPal.text
backgroundColor: qgcPal.windowShade backgroundColor: qgcPal.windowShade
......
...@@ -90,11 +90,10 @@ Rectangle { ...@@ -90,11 +90,10 @@ Rectangle {
color: qgcPal.windowShadeDark color: qgcPal.windowShadeDark
// Title text // Title text
Text { QGCLabel {
anchors.fill: parent anchors.fill: parent
color: qgcPal.buttonText color: qgcPal.buttonText
font.pixelSize: 12
text: modelData.name.toUpperCase() text: modelData.name.toUpperCase()
verticalAlignment: TextEdit.AlignVCenter verticalAlignment: TextEdit.AlignVCenter
......
...@@ -238,7 +238,7 @@ Rectangle { ...@@ -238,7 +238,7 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right anchors.right: parent.right
width: messages.width - messageIcon.width width: messages.width - messageIcon.width
Text { QGCLabel {
id: messageText id: messageText
text: (mainToolBar.messageCount > 0) ? mainToolBar.messageCount : '' text: (mainToolBar.messageCount > 0) ? mainToolBar.messageCount : ''
font.pointSize: screenTools.dpiAdjustedPointSize(14); font.pointSize: screenTools.dpiAdjustedPointSize(14);
...@@ -326,7 +326,7 @@ Rectangle { ...@@ -326,7 +326,7 @@ Rectangle {
smooth: true smooth: true
} }
Text { QGCLabel {
id: satelitteText id: satelitteText
text: (mainToolBar.satelliteCount > 0) ? mainToolBar.satelliteCount : '' text: (mainToolBar.satelliteCount > 0) ? mainToolBar.satelliteCount : ''
font.pointSize: screenTools.dpiAdjustedPointSize(14); font.pointSize: screenTools.dpiAdjustedPointSize(14);
...@@ -361,7 +361,7 @@ Rectangle { ...@@ -361,7 +361,7 @@ Rectangle {
smooth: true smooth: true
} }
Text { QGCLabel {
id: batteryText id: batteryText
text: mainToolBar.batteryVoltage.toFixed(1) + ' V'; text: mainToolBar.batteryVoltage.toFixed(1) + ' V';
font.pointSize: screenTools.dpiAdjustedPointSize(14); font.pointSize: screenTools.dpiAdjustedPointSize(14);
...@@ -389,7 +389,7 @@ Rectangle { ...@@ -389,7 +389,7 @@ Rectangle {
border.color: "#00000000" border.color: "#00000000"
border.width: 0 border.width: 0
Text { QGCLabel {
id: armedStatusText id: armedStatusText
text: (mainToolBar.systemArmed) ? qsTr("ARMED") : qsTr("DISARMED") text: (mainToolBar.systemArmed) ? qsTr("ARMED") : qsTr("DISARMED")
font.pointSize: screenTools.dpiAdjustedPointSize(12); font.pointSize: screenTools.dpiAdjustedPointSize(12);
...@@ -408,7 +408,7 @@ Rectangle { ...@@ -408,7 +408,7 @@ Rectangle {
border.color: "#00000000" border.color: "#00000000"
border.width: 0 border.width: 0
Text { QGCLabel {
id: stateStatusText id: stateStatusText
text: mainToolBar.currentState text: mainToolBar.currentState
font.pointSize: screenTools.dpiAdjustedPointSize(12); font.pointSize: screenTools.dpiAdjustedPointSize(12);
...@@ -429,7 +429,7 @@ Rectangle { ...@@ -429,7 +429,7 @@ Rectangle {
border.color: "#00000000" border.color: "#00000000"
border.width: 0 border.width: 0
Text { QGCLabel {
id: modeStatusText id: modeStatusText
text: mainToolBar.currentMode text: mainToolBar.currentMode
font.pointSize: screenTools.dpiAdjustedPointSize(12); font.pointSize: screenTools.dpiAdjustedPointSize(12);
...@@ -450,7 +450,7 @@ Rectangle { ...@@ -450,7 +450,7 @@ Rectangle {
border.color: "#00000000" border.color: "#00000000"
border.width: 0 border.width: 0
Text { QGCLabel {
id: connectionStatusText id: connectionStatusText
text: qsTr("CONNECTION LOST") text: qsTr("CONNECTION LOST")
font.pointSize: screenTools.dpiAdjustedPointSize(14); font.pointSize: screenTools.dpiAdjustedPointSize(14);
......
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