Browse Source

CP - Limit pixel density fudge to Android only

QGC4.4
Gus Grubba 7 years ago committed by Gus Grubba
parent
commit
c1da073b84
  1. 10
      src/QmlControls/ScreenTools.qml

10
src/QmlControls/ScreenTools.qml

@ -58,18 +58,14 @@ Item { @@ -58,18 +58,14 @@ Item {
if(QGroundControl.corePlugin.options.devicePixelDensity != 0) {
return QGroundControl.corePlugin.options.devicePixelDensity
}
//-- Apple returns proper values
if(isiOS || isMac) {
return Screen.pixelDensity
}
//-- Mobile is rather unreliable
if(isMobile) {
//-- Android is rather unreliable
if(isAndroid) {
// Lets assume it's unlikely you have a tablet over 300mm wide
if((Screen.width / Screen.pixelDensity) > 300) {
return Screen.pixelDensity * 2
}
}
//-- Still needs logical pixel density on Windows
//-- Let's use what the system tells us
return Screen.pixelDensity
}

Loading…
Cancel
Save