diff --git a/src/QmlControls/ScreenToolsController.cc b/src/QmlControls/ScreenToolsController.cc index 77c0bd14f2c643cc8e163923982b19b04da1e670..a20c8dad4bc50e41b52f8c26686a2ee899e8a620 100644 --- a/src/QmlControls/ScreenToolsController.cc +++ b/src/QmlControls/ScreenToolsController.cc @@ -28,15 +28,18 @@ #include "MainWindow.h" #ifdef Q_OS_WIN -const double ScreenToolsController::_defaultFontPixelSizeRatio = 1.0; -#elif __mobile__ -const double ScreenToolsController::_defaultFontPixelSizeRatio = 1.0; +const double ScreenToolsController::_defaultFontPixelSizeRatio = 1.0; +#elif __android__ +const double ScreenToolsController::_defaultFontPixelSizeRatio = 1.0; +#elif __ios__ +const double ScreenToolsController::_defaultFontPixelSizeRatio = 0.8; #else -const double ScreenToolsController::_defaultFontPixelSizeRatio = 0.8; +const double ScreenToolsController::_defaultFontPixelSizeRatio = 0.8; #endif -const double ScreenToolsController::_smallFontPixelSizeRatio = 0.75; -const double ScreenToolsController::_mediumFontPixelSizeRatio = 1.22; -const double ScreenToolsController::_largeFontPixelSizeRatio = 1.66; + +const double ScreenToolsController::_smallFontPixelSizeRatio = 0.75; +const double ScreenToolsController::_mediumFontPixelSizeRatio = 1.22; +const double ScreenToolsController::_largeFontPixelSizeRatio = 1.66; ScreenToolsController::ScreenToolsController() { diff --git a/src/QmlControls/SubMenuButton.qml b/src/QmlControls/SubMenuButton.qml index 3b0074bf3ed546e4f95bd812400873d02a9ca710..791362bedab6d2c601e03368921b27be7407f58e 100644 --- a/src/QmlControls/SubMenuButton.qml +++ b/src/QmlControls/SubMenuButton.qml @@ -39,7 +39,7 @@ Button { verticalAlignment: TextEdit.AlignVCenter horizontalAlignment: TextEdit.AlignHCenter color: showHighlight ? qgcPal.buttonHighlightText : qgcPal.buttonText - font.pixelSize: ScreenTools.isMobile ? ScreenTools.defaultFontPixelSize * 0.65 : ScreenTools.defaultFontPixelSize + font.pixelSize: ScreenTools.isMobile ? ScreenTools.defaultFontPixelSize * 0.75 : ScreenTools.defaultFontPixelSize text: control.text Rectangle { diff --git a/src/ui/MainWindow.qml b/src/ui/MainWindow.qml index a5f020236d4122abfb0be5a04b21d864e49df800..edfc0d8ad2dbf709a21e2b693238f31ece5d82c3 100644 --- a/src/ui/MainWindow.qml +++ b/src/ui/MainWindow.qml @@ -40,7 +40,7 @@ Item { QGCPalette { id: __qgcPal; colorGroupEnabled: true } - property real tbHeight: ScreenTools.isMobile ? (ScreenTools.isTinyScreen ? (mainWindow.width * 0.0666) : (mainWindow.width * 0.0444)) : ScreenTools.defaultFontPixelSize * 4 + property real tbHeight: ScreenTools.isMobile ? (ScreenTools.isTinyScreen ? (mainWindow.width * 0.0666) : (mainWindow.width * 0.05)) : ScreenTools.defaultFontPixelSize * 4 property int tbCellHeight: tbHeight * 0.75 property real tbSpacing: ScreenTools.isMobile ? width * 0.00824 : 9.54 property real tbButtonWidth: tbCellHeight * 1.3