summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2015-02-24 22:24:44 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2015-02-24 22:24:44 (GMT)
commit0b59e83530a6c8893a5d810ba8c3704627583615 (patch)
tree9b07cc3f73ac5e829365e7435413a8aa7ece1022
parent61554c833ed0c009cf977de7d9b0984221cc9e17 (diff)
fix format of zoom level percent
-rw-r--r--ui/pageview.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 89a2984..87f8d36 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -3791,7 +3791,6 @@ void PageView::updateZoomText()
translated << i18n("Fit Width") << i18n("Fit Page") << i18n("Auto Fit");
// add percent items
- const QString single_oh( "0" );
int idx = 0, selIdx = 3;
bool inserted = false; //use: "d->zoomMode != ZoomFixed" to hide Fit/* zoom ratio
int zoomValueCount = 11;
@@ -3809,8 +3808,8 @@ void PageView::updateZoomText()
if ( !inserted )
selIdx++;
// we do not need to display 2-digit precision
- QString localValue( QLocale().toString( value * 100.0, 'g', 1 ) );
- localValue.remove( QLocale().decimalPoint() + single_oh );
+ QString localValue( QLocale().toString( value * 100.0, 'f', 1 ) );
+ localValue.remove( QLocale().decimalPoint() + '0' );
// remove a trailing zero in numbers like 66.70
if ( localValue.right( 1 ) == QLatin1String( "0" ) && localValue.indexOf( QLocale().decimalPoint() ) > -1 )
localValue.chop( 1 );