diff options
Diffstat (limited to 'vcl/qt5/Qt5Graphics.cxx')
-rw-r--r-- | vcl/qt5/Qt5Graphics.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5Graphics.cxx b/vcl/qt5/Qt5Graphics.cxx index e9d57d2d86af..34f610812d45 100644 --- a/vcl/qt5/Qt5Graphics.cxx +++ b/vcl/qt5/Qt5Graphics.cxx @@ -45,8 +45,10 @@ Qt5Graphics::Qt5Graphics( Qt5Frame *pFrame, QImage *pQImage ) if (!initWidgetDrawBackends(false)) { if (!Qt5Data::noNativeControls()) - m_pWidgetDraw.reset(new Qt5Graphics_Controls()); + m_pWidgetDraw.reset(new Qt5Graphics_Controls(*this)); } + if (m_pFrame) + setDevicePixelRatioF(m_pFrame->devicePixelRatioF()); } Qt5Graphics::~Qt5Graphics() { ReleaseFonts(); } @@ -116,8 +118,10 @@ void Qt5Graphics::handleDamage(const tools::Rectangle& rDamagedRegion) assert(!rDamagedRegion.IsEmpty()); QImage* pImage = static_cast<Qt5Graphics_Controls*>(m_pWidgetDraw.get())->getImage(); + QImage blit(*pImage); + blit.setDevicePixelRatio(1); Qt5Painter aPainter(*this); - aPainter.drawImage(QPoint(rDamagedRegion.getX(), rDamagedRegion.getY()), *pImage); + aPainter.drawImage(QPoint(rDamagedRegion.getX(), rDamagedRegion.getY()), blit); aPainter.update(toQRect(rDamagedRegion)); } |