diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2019-01-14 16:12:20 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2019-01-15 08:51:27 +0000 |
commit | 62d3823bf4e33d8b5c2c5c51fc1ba4c957b0d7eb (patch) | |
tree | 344365474436c2d148d80f6dea67a3c5e18a163a /src/Authoring/Studio/Render/Q3DSTranslation.cpp | |
parent | bc06cb1408e05c9a8b357bb4bec434b160462c17 (diff) |
Resize scene according to pixel ratio like rest of the UI
The scene view now follows the pixel ratio scaling like rest of the
editor UI. This makes the scaling identical to the viewer and runtime2
internal logic, which helps to avoid issues like reverting presentation
breaking mouse mapping logic.
Task-number: QT3DS-2901
Change-Id: I8b4fc6c5183307f8536692249343f10df7c98a18
Reviewed-by: Janne Kangas <janne.kangas@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Render/Q3DSTranslation.cpp')
-rw-r--r-- | src/Authoring/Studio/Render/Q3DSTranslation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Render/Q3DSTranslation.cpp b/src/Authoring/Studio/Render/Q3DSTranslation.cpp index 93212fd2..57030d3e 100644 --- a/src/Authoring/Studio/Render/Q3DSTranslation.cpp +++ b/src/Authoring/Studio/Render/Q3DSTranslation.cpp @@ -697,7 +697,7 @@ void Q3DSTranslation::clearDirtySet() m_dirtySet.clear(); } -void Q3DSTranslation::prepareRender(const QRect &rect, const QSize &size) +void Q3DSTranslation::prepareRender(const QRect &rect, const QSize &size, qreal pixelRatio) { if (!m_scene) return; @@ -719,7 +719,7 @@ void Q3DSTranslation::prepareRender(const QRect &rect, const QSize &size) m_editCameraInfo.applyToCamera(*camera, QSizeF(m_size)); } if (rect != m_rect || size != m_size) { - m_engine->sceneManager()->updateSizes(size, 1.0, rect, true); + m_engine->sceneManager()->updateSizes(size, pixelRatio, rect, true); m_rect = rect; m_size = size; } |