Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion YACReader/mouse_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {

Expand Down
6 changes: 5 additions & 1 deletion YACReader/viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down