mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-25 10:55:37 +00:00
fix format of zoom level percent
This commit is contained in:
parent
61554c833e
commit
0b59e83530
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue