techdraw: remove QGVPage::getDevicePixelRatio() in favor of getMaximumDPR

This commit is contained in:
captain0xff
2025-04-03 19:38:36 +05:30
parent 08381b1d18
commit 5e8d048524
2 changed files with 1 additions and 13 deletions

View File

@@ -557,17 +557,6 @@ QColor QGVPage::getBackgroundColor()
return fcColor.asValue<QColor>();
}
double QGVPage::getDevicePixelRatio() const
{
for (Gui::MDIView* view : m_vpPage->getDocument()->getMDIViews()) {
if (view->isDerivedFrom<Gui::View3DInventor>()) {
return static_cast<Gui::View3DInventor*>(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

View File

@@ -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;