From 99eb55f1027f9412433d93b46d86f741eef06db7 Mon Sep 17 00:00:00 2001 From: dogmaphobic Date: Tue, 9 Jun 2015 12:22:51 -0400 Subject: [PATCH] Adding default tool bar height as it got lost in translation. Also adding a constant for the font size in SensorComponent. --- src/AutoPilotPlugins/PX4/SensorsComponent.qml | 4 ++-- src/ui/toolbar/MainToolBar.cc | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/AutoPilotPlugins/PX4/SensorsComponent.qml b/src/AutoPilotPlugins/PX4/SensorsComponent.qml index bce10ff33..3b3dccac1 100644 --- a/src/AutoPilotPlugins/PX4/SensorsComponent.qml +++ b/src/AutoPilotPlugins/PX4/SensorsComponent.qml @@ -57,8 +57,8 @@ QGCView { // Used to pass help text to the preCalibrationDialog dialog property string preCalibrationDialogHelp - readonly property int sideBarH1PointSize: (ScreenTools.defaultFontPizelSize * 1.3 + 0.5) - readonly property int mainTextH1PointSize: (ScreenTools.defaultFontPizelSize * 1.5 + 0.5) + readonly property int sideBarH1PointSize: ScreenTools.mediumFontPixelSize + readonly property int mainTextH1PointSize: ScreenTools.mediumFontPixelSize // Seems to be unused readonly property int rotationColumnWidth: 250 readonly property var rotations: [ diff --git a/src/ui/toolbar/MainToolBar.cc b/src/ui/toolbar/MainToolBar.cc index 0381943a6..845662df0 100644 --- a/src/ui/toolbar/MainToolBar.cc +++ b/src/ui/toolbar/MainToolBar.cc @@ -31,6 +31,7 @@ This file is part of the QGROUNDCONTROL project #include #include "MainToolBar.h" +#include "ScreenTools.h" #include "MainWindow.h" #include "UASMessageView.h" #include "UASMessageHandler.h" @@ -63,6 +64,8 @@ MainToolBar::MainToolBar(QWidget* parent) if(pl) { pl->setContentsMargins(0,0,0,0); } + setMinimumHeight(40 * ScreenTools::pixelSizeFactor_s()); + setMaximumHeight(40 * ScreenTools::pixelSizeFactor_s()); // Tool Bar Preferences QSettings settings; settings.beginGroup(TOOL_BAR_SETTINGS_GROUP); -- 2.22.0