From c73cb273e088bcc6c459a3651e54ef1ad59f66a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 9 Apr 2020 21:59:39 +0200 Subject: kpdf: Enable zoom up to 800%. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 7f685c3c9bd1f5f99ca2e56876ca02a254e3b85d) --- kpdf/ui/pageview.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'kpdf/ui') diff --git a/kpdf/ui/pageview.cpp b/kpdf/ui/pageview.cpp index 58c46101..556512de 100644 --- a/kpdf/ui/pageview.cpp +++ b/kpdf/ui/pageview.cpp @@ -1056,8 +1056,8 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) double nX = (double)(selRect.left() + selRect.right()) / (2.0 * (double)contentsWidth()); double nY = (double)(selRect.top() + selRect.bottom()) / (2.0 * (double)contentsHeight()); - // zoom up to 400% - if ( d->zoomFactor <= 4.0 || zoom <= 1.0 ) + // zoom up to 800% + if ( d->zoomFactor <= 8.0 || zoom <= 1.0 ) { d->zoomFactor *= zoom; viewport()->setUpdatesEnabled( false ); @@ -1537,8 +1537,8 @@ void PageView::updateZoom( ZoomMode newZoomMode ) d->zoomFactor = -1; break; } - if ( newFactor > 4.0 ) - newFactor = 4.0; + if ( newFactor > 8.0 ) + newFactor = 8.0; if ( newFactor < 0.1 ) newFactor = 0.1; @@ -1582,13 +1582,13 @@ void PageView::updateZoomText() // add percent items TQString double_oh( "00" ); - const float zoomValue[10] = { 0.125, 0.25, 0.333, 0.5, 0.667, 0.75, 1, 1.25, 1.50, 2 }; + const float zoomValue[11] = { 0.125, 0.25, 0.333, 0.5, 0.667, 0.75, 1, 1.25, 1.50, 2, 4 }; int idx = 0, selIdx = 2; // use 3 if "fit text" present bool inserted = false; //use: "d->zoomMode != ZoomFixed" to hide Fit/* zoom ratio - while ( idx < 10 || !inserted ) + while ( idx < 11 || !inserted ) { - float value = idx < 10 ? zoomValue[ idx ] : newFactor; + float value = idx < 11 ? zoomValue[ idx ] : newFactor; if ( !inserted && newFactor < (value - 0.0001) ) value = newFactor; else -- cgit v1.2.1