fix: grab rect dpi error

This commit is contained in:
Barry 2022-04-09 12:10:06 +08:00
parent ccba6c7495
commit 2c015358f7

View file

@ -90,8 +90,8 @@ QRect VideoForm::getGrabCursorRect()
#if defined(Q_OS_WIN32)
rc = QRect(ui->keepRatioWidget->mapToGlobal(m_videoWidget->pos()), m_videoWidget->size());
// high dpi support
rc.setTopLeft(rc.topLeft() * m_videoWidget->devicePixelRatio());
rc.setBottomRight(rc.bottomRight() * m_videoWidget->devicePixelRatio());
rc.setTopLeft(rc.topLeft() * m_videoWidget->devicePixelRatioF());
rc.setBottomRight(rc.bottomRight() * m_videoWidget->devicePixelRatioF());
rc.setX(rc.x() + 10);
rc.setY(rc.y() + 10);