Commit af0131b6 authored by Don Gagne's avatar Don Gagne Committed by Lorenz Meier

Better sizing of instrument panel

parent e70b4b0f
......@@ -39,12 +39,10 @@ Item {
QGCPalette { id: qgcPal }
function getPreferredInstrumentWidth() {
if(ScreenTools.isMobile) {
return mainWindow.width * 0.25
} else if(ScreenTools.isHugeScreen) {
return mainWindow.width * 0.11
}
return ScreenTools.defaultFontPixelWidth * 30
// Don't allow instrument panel to chew more than 1/4 of full window
var defaultWidth = ScreenTools.defaultFontPixelWidth * 30
var maxWidth = mainWindow.width * 0.25
return Math.min(maxWidth, defaultWidth)
}
function _setInstrumentWidget() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment