diff --git a/src/QmlControls/ToolStrip.qml b/src/QmlControls/ToolStrip.qml index 1e674ba79c7817f532c9945228727fec8ca6c9e5..5f8746a9d263b6499063f479c64361bb6b27012f 100644 --- a/src/QmlControls/ToolStrip.qml +++ b/src/QmlControls/ToolStrip.qml @@ -35,38 +35,7 @@ Rectangle { readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2 readonly property real _buttonSpacing: ScreenTools.defaultFontPixelWidth - // All of the following values, connections and function are to support the ability to determine - // whether to show or hide the optional elements on the fly. - - property bool _showOptionalElements: true - property bool _needRecalc: false - - Component.onCompleted: recalcShowOptionalElements() - onMaxHeightChanged: recalcShowOptionalElements() - - Connections { - target: ScreenTools - - onDefaultFontPixelWidthChanged: recalcShowOptionalElements() - onDefaultFontPixelHeightChanged: recalcShowOptionalElements() - } - - onHeightChanged: { - if (_needRecalc) { - _needRecalc = false - if (maxHeight && height > maxHeight) { - _showOptionalElements = false - } - } - } - - function recalcShowOptionalElements() { - if (maxHeight > 0) { - _needRecalc = false - _showOptionalElements = height <= maxHeight - _needRecalc = true - } - } + property bool _showOptionalElements: !ScreenTools.isTinyScreen QGCPalette { id: qgcPal } ExclusiveGroup { id: dropButtonsExclusiveGroup }