Skip to content
Snippets Groups Projects
Commit a0d1d6fc authored by DonLakeFlyer's avatar DonLakeFlyer
Browse files

Stop being smart about Tooltrip text hiding

parent a75ec97b
No related branches found
No related tags found
No related merge requests found
...@@ -35,38 +35,7 @@ Rectangle { ...@@ -35,38 +35,7 @@ Rectangle {
readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2 readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2
readonly property real _buttonSpacing: ScreenTools.defaultFontPixelWidth readonly property real _buttonSpacing: ScreenTools.defaultFontPixelWidth
// All of the following values, connections and function are to support the ability to determine property bool _showOptionalElements: !ScreenTools.isTinyScreen
// 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
}
}
QGCPalette { id: qgcPal } QGCPalette { id: qgcPal }
ExclusiveGroup { id: dropButtonsExclusiveGroup } ExclusiveGroup { id: dropButtonsExclusiveGroup }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment