|
|
|
@ -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 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|