diff --git a/YACReader/mouse_handler.cpp b/YACReader/mouse_handler.cpp index dcdfec9f4..9cb3aac82 100644 --- a/YACReader/mouse_handler.cpp +++ b/YACReader/mouse_handler.cpp @@ -109,7 +109,9 @@ void YACReader::MouseHandler::mouseMoveEvent(QMouseEvent *event) if (gtfPos.y() < 0 || gtfPos.x() < 0 || gtfPos.x() > viewer->goToFlow->width()) // TODO this extra check is for Mavericks (mouseMove over goToFlowGL seems to be broken) viewer->animateHideGoToFlow(); // goToFlow->hide(); - } else { + } else if (!viewer->magnifyingGlassShown) { + // Don't pop up the bottom page-selection bar while the + // magnifying glass is active: it prevents magnifying that area. int umbral = (viewer->width() - viewer->goToFlow->width()) / 2; if ((position.y() > viewer->height() - 15) && (position.x() > umbral) && (position.x() < viewer->width() - umbral)) { diff --git a/YACReader/viewer.cpp b/YACReader/viewer.cpp index df7cbacc9..17d6d1903 100644 --- a/YACReader/viewer.cpp +++ b/YACReader/viewer.cpp @@ -1070,8 +1070,12 @@ QImage Viewer::grabMagnifiedRegion(const QPoint &viewerPos, const QSize &glassSi } if (outImage) { + // The magnified image is kept at source resolution (device pixel ratio 1), + // matching the in-bounds path below. Do NOT set a >1 device pixel ratio here: + // a QPainter draws in logical coordinates, so painting the DPR-1 source crop + // onto a DPR>1 image would scale the content up by the ratio (and clip it), + // producing a sudden magnification jump at the image edges on HiDPI displays. QImage img(zoomWScaled, zoomHScaled, QImage::Format_RGB32); - img.setDevicePixelRatio(devicePixelRatioF()); img.fill(bgColor); if (zw > 0 && zh > 0) { QPainter painter(&img);