Android: [REG] Fix QScreen::physicalSize()
The physical size should be set based on the screen size, not the available geometry. This used to work in Qt 5.3.0 because the screenSize and size of the available geometry was identical on startup, but in Qt 5.3.1 the available geometry is 0x0 until there the metrics are actually available to avoid flickering on startup, so this caused a regression. [ChangeLog][Android] Fixed regression where QScreen::physicalSize() would return 0x0. Change-Id: I6c2ee11205427a88764e129b05ece6d3fbbf4c99 Task-number: QTBUG-39978 Reviewed-by: Christian Stromme <christian.stromme@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
parent
9569836668
commit
ac2b15bdd0
@ -562,13 +562,13 @@ static void setDisplayMetrics(JNIEnv */*env*/, jclass /*clazz*/,
|
||||
if (!m_androidPlatformIntegration) {
|
||||
QAndroidPlatformIntegration::setDefaultDisplayMetrics(desktopWidthPixels,
|
||||
desktopHeightPixels,
|
||||
qRound(double(desktopWidthPixels) / xdpi * 25.4),
|
||||
qRound(double(desktopHeightPixels) / ydpi * 25.4),
|
||||
qRound(double(widthPixels) / xdpi * 25.4),
|
||||
qRound(double(heightPixels) / ydpi * 25.4),
|
||||
widthPixels,
|
||||
heightPixels);
|
||||
} else {
|
||||
m_androidPlatformIntegration->setDisplayMetrics(qRound(double(desktopWidthPixels) / xdpi * 25.4),
|
||||
qRound(double(desktopHeightPixels) / ydpi * 25.4));
|
||||
m_androidPlatformIntegration->setDisplayMetrics(qRound(double(widthPixels) / xdpi * 25.4),
|
||||
qRound(double(heightPixels) / ydpi * 25.4));
|
||||
m_androidPlatformIntegration->setDesktopSize(desktopWidthPixels, desktopHeightPixels);
|
||||
m_androidPlatformIntegration->setScreenSize(widthPixels, heightPixels);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user