diff --git a/src/Mod/TechDraw/Gui/QGVPage.cpp b/src/Mod/TechDraw/Gui/QGVPage.cpp index fec0d9c9ba..8bd105dfd3 100644 --- a/src/Mod/TechDraw/Gui/QGVPage.cpp +++ b/src/Mod/TechDraw/Gui/QGVPage.cpp @@ -557,17 +557,6 @@ QColor QGVPage::getBackgroundColor() return fcColor.asValue(); } -double QGVPage::getDevicePixelRatio() const -{ - for (Gui::MDIView* view : m_vpPage->getDocument()->getMDIViews()) { - if (view->isDerivedFrom()) { - return static_cast(view)->getViewer()->devicePixelRatio(); - } - } - - return 1.0; -} - QPixmap QGVPage::prepareCursorPixmap(const char* iconName, QPoint& hotspot) { @@ -586,7 +575,7 @@ QPixmap QGVPage::prepareCursorPixmap(const char* iconName, QPoint& hotspot) // therefore we must take care of the transformation ourselves... // Refer to QTBUG-68571 - https://bugreports.qt.io/browse/QTBUG-68571 if (qGuiApp->platformName() == QLatin1String("xcb")) { - floatHotspot *= getDevicePixelRatio(); + floatHotspot *= Gui::BitmapFactoryInst::getMaximumDPR(); } #endif diff --git a/src/Mod/TechDraw/Gui/QGVPage.h b/src/Mod/TechDraw/Gui/QGVPage.h index 7a5b524574..332576871a 100644 --- a/src/Mod/TechDraw/Gui/QGVPage.h +++ b/src/Mod/TechDraw/Gui/QGVPage.h @@ -152,7 +152,6 @@ protected: QColor getBackgroundColor(); - double getDevicePixelRatio() const; QPixmap prepareCursorPixmap(const char* iconName, QPoint& hotspot); void drawForeground(QPainter* painter, const QRectF& rect) override;