Changeset View
Changeset View
Standalone View
Standalone View
src/ImageViewer.cpp
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Line(s) | |||||
112 | void ImageViewer::zoomOut() | 112 | void ImageViewer::zoomOut() | ||
113 | { | 113 | { | ||
114 | scale(1.0 / 1.5, 1.0 / 1.5); | 114 | scale(1.0 / 1.5, 1.0 / 1.5); | ||
115 | } | 115 | } | ||
116 | 116 | | |||
117 | // ------------------------------------------------------------------------ | 117 | // ------------------------------------------------------------------------ | ||
118 | void ImageViewer::zoomActualSize() | 118 | void ImageViewer::zoomActualSize() | ||
119 | { | 119 | { | ||
120 | setMatrix(QMatrix()); | 120 | resetTransform(); | ||
121 | } | 121 | } | ||
122 | 122 | | |||
123 | // ------------------------------------------------------------------------ | 123 | // ------------------------------------------------------------------------ | ||
124 | void ImageViewer::zoom2Fit() | 124 | void ImageViewer::zoom2Fit() | ||
125 | { | 125 | { | ||
126 | QRectF r = d->img->rect(); | 126 | QRectF r = d->img->rect(); | ||
127 | const auto dpr = d->img->devicePixelRatio(); | 127 | const auto dpr = d->img->devicePixelRatio(); | ||
128 | r = QRectF(r.topLeft() / dpr, r.size() / dpr); | 128 | r = QRectF(r.topLeft() / dpr, r.size() / dpr); | ||
Show All 19 Lines |