diff --git a/src/MissionEditor/MissionEditor.qml b/src/MissionEditor/MissionEditor.qml index e71b2302627e5eb0f4880f0db8987737bfe13b56..f2eee50d5b960e302828454a4d0f1311ac8d9488 100644 --- a/src/MissionEditor/MissionEditor.qml +++ b/src/MissionEditor/MissionEditor.qml @@ -554,6 +554,7 @@ QGCView { anchors.leftMargin: parent.width - _rightPanelWidth anchors.left: parent.left spacing: _horizontalMargin + visible: QGroundControl.corePlugin.options.enablePlanViewSelector readonly property real _buttonRadius: ScreenTools.defaultFontPixelHeight * 0.75 @@ -615,7 +616,7 @@ QGCView { Item { id: missionItemEditor anchors.topMargin: _margin - anchors.top: planElementSelectorRow.bottom + anchors.top: planElementSelectorRow.visible ? planElementSelectorRow.bottom : planElementSelectorRow.top anchors.bottom: parent.bottom anchors.right: parent.right width: _rightPanelWidth diff --git a/src/QmlControls/ScreenTools.qml b/src/QmlControls/ScreenTools.qml index 84bb0a099f204eb4f1fa8b3d5fbe54404cb04e05..9645592735af002048c58c5eb152104e6a215a7f 100644 --- a/src/QmlControls/ScreenTools.qml +++ b/src/QmlControls/ScreenTools.qml @@ -47,7 +47,7 @@ Item { property real largeFontPointSize: 10 property real availableHeight: 0 - property real toolbarHeight: defaultFontPixelHeight * 3 + property real toolbarHeight: 0 readonly property real smallFontPointRatio: 0.75 readonly property real mediumFontPointRatio: 1.25 @@ -93,6 +93,7 @@ Item { smallFontPointSize = defaultFontPointSize * _screenTools.smallFontPointRatio mediumFontPointSize = defaultFontPointSize * _screenTools.mediumFontPointRatio largeFontPointSize = defaultFontPointSize * _screenTools.largeFontPointRatio + toolbarHeight = defaultFontPixelHeight * 3 * QGroundControl.corePlugin.options.toolbarHeightMultiplier } Text { @@ -107,7 +108,10 @@ Item { property real fontWidth: contentWidth property real fontHeight: contentHeight Component.onCompleted: { - var baseSize = QGroundControl.baseFontPointSize; + var baseSize = QGroundControl.corePlugin.options.defaultFontPointSize + if(baseSize == 0.0) { + baseSize = QGroundControl.baseFontPointSize; + } //-- If this is the first time (not saved in settings) if(baseSize < 6 || baseSize > 48) { //-- Init base size base on the platform diff --git a/src/api/QGCOptions.h b/src/api/QGCOptions.h index e1e9135120a2e831cf0165a497ca2e1262f955bd..1845d3abbe3d39482295a983e34aa2cd0ea08971 100644 --- a/src/api/QGCOptions.h +++ b/src/api/QGCOptions.h @@ -29,6 +29,9 @@ public: Q_PROPERTY(bool definesVideo READ definesVideo CONSTANT) Q_PROPERTY(uint16_t videoUDPPort READ videoUDPPort CONSTANT) Q_PROPERTY(QString videoRSTPUrl READ videoRSTPUrl CONSTANT) + Q_PROPERTY(double toolbarHeightMultiplier READ toolbarHeightMultiplier CONSTANT) + Q_PROPERTY(double defaultFontPointSize READ defaultFontPointSize CONSTANT) + Q_PROPERTY(bool enablePlanViewSelector READ enablePlanViewSelector CONSTANT) //! Should QGC hide its settings menu and colapse it into one single menu (Settings and Vehicle Setup)? /*! @@ -65,4 +68,19 @@ public: @return RTSP url to use. Return "" to disable RTSP. */ virtual QString videoRSTPUrl () { return QString(); } + //! Main ToolBar Multiplier. + /*! + @return Factor to use when computing toolbar height + */ + virtual double toolbarHeightMultiplier () { return 1.0; } + //! Application wide default font point size + /*! + @return Font size or 0.0 to use computed size. + */ + virtual double defaultFontPointSize () { return 0.0; } + //! Enable Plan View Selector (Mission, Fence or Rally) + /*! + @return True or false + */ + virtual bool enablePlanViewSelector () { return true; } };