take devicePixelRatio into account when copying a part of a QPixmap (frequently of 2 in macbook and retina displays)

preferencesAboutTextFull
Clément Fauconnier 4 years ago
parent e2d1594629
commit 3874c9127a
  1. 6
      src/desktop/UBCustomCaptureWindow.cpp

@ -60,7 +60,11 @@ QPixmap UBCustomCaptureWindow::getSelectedPixmap()
{
if (mSelectionBand)
{
return mWholeScreenPixmap.copy(mSelectionBand->geometry());
QRect r = mSelectionBand->geometry();
return mWholeScreenPixmap.copy( r.x() *mWholeScreenPixmap.devicePixelRatio(),
r.y() *mWholeScreenPixmap.devicePixelRatio(),
r.width() *mWholeScreenPixmap.devicePixelRatio(),
r.height() *mWholeScreenPixmap.devicePixelRatio());
}
else
{

Loading…
Cancel
Save