summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@theqtcompany.com>2015-11-24 12:39:23 +0100
committerMaurice Kalinowski <maurice.kalinowski@theqtcompany.com>2015-11-24 14:46:44 +0000
commit4fd1e5f40c791a920007e842252229826d20c9c9 (patch)
treeeaa567c162579eed06686abdd0b3403512012d8c /src
parent837b5d458970f3981859cb9dfa0cec5fcd6d0c4f (diff)
winrt: Fix text rendering
This is a partial revert of aecf3006bddb959795d03dd72d9c520e49713913. The DPI needs to be set inside the constructor to have the text rendering initialize properly. Landscape orientation fix is still valid and the dpi change was unrelated to resolve QTBUG-49470. Task-number: QTBUG-49610 Task-number: QTBUG-49470 Change-Id: I928b8d291b65cd744731c009917804b96253c276 Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp
index 158917184c..a642443386 100644
--- a/src/plugins/platforms/winrt/qwinrtscreen.cpp
+++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp
@@ -507,6 +507,8 @@ QWinRTScreen::QWinRTScreen()
hr = d->displayInformation->get_NativeOrientation(&displayOrientation);
Q_ASSERT_SUCCEEDED(hr);
d->nativeOrientation = static_cast<Qt::ScreenOrientation>(static_cast<int>(qtOrientationsFromNative(displayOrientation)));
+ // Set initial pixel density
+ onDpiChanged(Q_NULLPTR, Q_NULLPTR);
d->orientation = d->nativeOrientation;
ComPtr<IApplicationViewStatics2> applicationViewStatics;
@@ -753,7 +755,6 @@ void QWinRTScreen::initialize()
Q_ASSERT_SUCCEEDED(hr);
hr = d->displayInformation->add_DpiChanged(Callback<DisplayInformationHandler>(this, &QWinRTScreen::onDpiChanged).Get(), &d->displayTokens[&IDisplayInformation::remove_DpiChanged]);
Q_ASSERT_SUCCEEDED(hr);
- onDpiChanged(Q_NULLPTR, Q_NULLPTR);
onOrientationChanged(Q_NULLPTR, Q_NULLPTR);
onVisibilityChanged(nullptr, nullptr);
}