aacid added inline comments. INLINE COMMENTS
> pageview.cpp:1334 > // restore viewport center or use default {x-center,v-top} alignment > - const QRect & r = item->croppedGeometry(); > - int newCenterX = r.left(), > - newCenterY = r.top(); > - if ( vp.rePos.enabled ) > - { > - if ( vp.rePos.pos == Okular::DocumentViewport::Center ) > - { > - newCenterX += (int)( normClamp( vp.rePos.normalizedX, 0.5 ) * > (double)r.width() ); > - newCenterY += (int)( normClamp( vp.rePos.normalizedY, 0.0 ) * > (double)r.height() ); > - } > - else > - { > - // TopLeft > - newCenterX += (int)( normClamp( vp.rePos.normalizedX, 0.0 ) * > (double)r.width() + viewport()->width() / 2 ); > - newCenterY += (int)( normClamp( vp.rePos.normalizedY, 0.0 ) * > (double)r.height() + viewport()->height() / 2 ); > - } > - } > - else > - { > - newCenterX += r.width() / 2; > - newCenterY += viewport()->height() / 2 - 10; > - } > + QPoint centerCoord = viewportToContentArea( vp ); > const > pageview.cpp:4656 > + > + QPoint centerPos = viewportToContentArea( vp ); > + center( centerPos.x(), centerPos.y() ); const REPOSITORY R223 Okular BRANCH unify_vp_calc REVISION DETAIL https://phabricator.kde.org/D16941 To: tobiasdeiminger, #okular, sander Cc: ngraham, sander, aacid, okular-devel, darcyshen