Commit c1da073b authored by Gus Grubba's avatar Gus Grubba Committed by Gus Grubba

CP - Limit pixel density fudge to Android only

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