[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [okular] ui: Two changes in PageView's zoom combobox
From:       Fabio D'Urso <fabiodurso () hotmail ! it>
Date:       2012-12-01 0:47:36
Message-ID: 20121201004736.39FE4A6091 () git ! kde ! org
[Download RAW message or body]

Git commit 9101f9b41088c102c7a0af8ca67a30ee0c8eb25d by Fabio D'Urso.
Committed on 01/12/2012 at 01:34.
Pushed by fabiod into branch 'master'.

Two changes in PageView's zoom combobox

 - Removed useless document->supportsTiles() check in setupBaseActions()
   setupBaseActions() is called only once, before a document is opened,
   therefore supportsTiles() always returns false
 - Show the 400% entry even when tiled rendering is not available, so
   that the last entry always corresponds to the maximum allowed zoom
   level (i.e. 1600% or 400% according to whether tiled rendering is
   available or not)

M  +2    -5    ui/pageview.cpp

http://commits.kde.org/okular/9101f9b41088c102c7a0af8ca67a30ee0c8eb25d

diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index bf8b546..e5ec39b 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -413,10 +413,7 @@ void PageView::setupBaseActions( KActionCollection * ac )
     d->aZoom  = new KSelectAction(KIcon( "page-zoom" ), i18n("Zoom"), this);
     ac->addAction("zoom_to", d->aZoom );
     d->aZoom->setEditable( true );
-    if ( d->document->supportsTiles() )
-        d->aZoom->setMaxComboViewCount( 16 );
-    else
-        d->aZoom->setMaxComboViewCount( 13 );
+    d->aZoom->setMaxComboViewCount( 14 );
     connect( d->aZoom, SIGNAL(triggered(QAction*)), this, SLOT(slotZoom()) );
     updateZoomText();
 
@@ -3575,7 +3572,7 @@ void PageView::updateZoomText()
     const float zoomValue[13] = { 0.12, 0.25, 0.33, 0.50, 0.66, 0.75, 1.00, 1.25, \
1.50, 2.00, 4.00, 8.00, 16.00 };  int idx = 0, selIdx = 2;
     bool inserted = false; //use: "d->zoomMode != ZoomFixed" to hide Fit/* zoom \
                ratio
-    int zoomValueCount = 10;
+    int zoomValueCount = 11;
     if ( d->document->supportsTiles() )
         zoomValueCount = 13;
     while ( idx < zoomValueCount || !inserted )


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic