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 { ...@@ -39,12 +39,10 @@ Item {
QGCPalette { id: qgcPal } QGCPalette { id: qgcPal }
function getPreferredInstrumentWidth() { function getPreferredInstrumentWidth() {
if(ScreenTools.isMobile) { // Don't allow instrument panel to chew more than 1/4 of full window
return mainWindow.width * 0.25 var defaultWidth = ScreenTools.defaultFontPixelWidth * 30
} else if(ScreenTools.isHugeScreen) { var maxWidth = mainWindow.width * 0.25
return mainWindow.width * 0.11 return Math.min(maxWidth, defaultWidth)
}
return ScreenTools.defaultFontPixelWidth * 30
} }
function _setInstrumentWidget() { 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