Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/KoCanvasControllerWidget.cpp
Context not available. | |||||
55 | // compensate. | 55 | // compensate. | ||
---|---|---|---|---|---|
56 | 56 | | |||
57 | QPoint pt(q->horizontalScrollBar()->value(), q->verticalScrollBar()->value()); | 57 | QPoint pt(q->horizontalScrollBar()->value(), q->verticalScrollBar()->value()); | ||
58 | q->proxyObject->emitMoveDocumentOffset(pt); | 58 | q->proxyObject->emitMoveDocumentOffsetDevicePixel(pt); | ||
59 | 59 | | |||
60 | QWidget *canvasWidget = canvas->canvasWidget(); | 60 | QWidget *canvasWidget = canvas->canvasWidget(); | ||
61 | 61 | | |||
Context not available. | |||||
86 | int horizontalReserve = vastScrollingFactor * drawW; | 86 | int horizontalReserve = vastScrollingFactor * drawW; | ||
87 | int verticalReserve = vastScrollingFactor * drawH; | 87 | int verticalReserve = vastScrollingFactor * drawH; | ||
88 | 88 | | |||
89 | int xMin = -horizontalReserve; | 89 | // HACK: Convert to device pixels | ||
90 | int yMin = -verticalReserve; | 90 | int xMin = static_cast<int>(-horizontalReserve * viewportWidget->devicePixelRatioF()); | ||
91 | int yMin = static_cast<int>(-verticalReserve * viewportWidget->devicePixelRatioF()); | ||||
91 | 92 | | |||
92 | int xMax = docW - drawW + horizontalReserve; | 93 | // HACK: Convert to device pixels | ||
93 | int yMax = docH - drawH + verticalReserve; | 94 | int xMax = static_cast<int>(docW - (drawW + horizontalReserve) * viewportWidget->devicePixelRatioF()); | ||
95 | int yMax = static_cast<int>(docH - (drawH + verticalReserve) * viewportWidget->devicePixelRatioF()); | ||||
94 | 96 | | |||
95 | hScroll->setRange(xMin, xMax); | 97 | hScroll->setRange(xMin, xMax); | ||
96 | vScroll->setRange(yMin, yMax); | 98 | vScroll->setRange(yMin, yMax); | ||
Context not available. |