fixed wrong setting being used as reading zoom, ZOOM_LEVEL has to be renamed to FLOW_ZOOM_LEVEL

This commit is contained in:
Luis Ángel San Martín 2015-12-09 22:47:24 +01:00
parent be0ef4f20f
commit 13275933c8
2 changed files with 4 additions and 6 deletions

View File

@ -58,8 +58,8 @@ using namespace YACReader;
void setMagnifyingGlassSize(const QSize & mgs) { settings->setValue(MAG_GLASS_SIZE,mgs);}
QSize getGotoSlideSize() { return settings->value(GO_TO_FLOW_SIZE).toSize();}
void setGotoSlideSize(const QSize & gss) { settings->setValue(GO_TO_FLOW_SIZE,gss);}
float getZoomLevel() { return settings->value(ZOOM_LEVEL).toInt();}
void setZoomLevel(int zl) { settings->setValue(ZOOM_LEVEL,zl);}
float getZoomLevel() { return settings->value(ZOOM_LEVEL).toFloat();}
void setZoomLevel(float zl) { settings->setValue(ZOOM_LEVEL,zl);}
//Unified enum based fitmode
YACReader::FitMode getFitMode() { return static_cast<YACReader::FitMode>(settings->value(FITMODE, YACReader::FitMode::FullPage).toInt()); }

View File

@ -75,9 +75,8 @@ YACReaderSlider::YACReaderSlider(QWidget *parent)
slider->setFocusPolicy(Qt::NoFocus);
int value = Configuration::getConfiguration().getZoomLevel()*100;
slider->setValue(value);
percentageLabel->setText(QString("%1 %").arg(value));
slider->setValue(100);
percentageLabel->setText(QString("%1 %").arg(100));
connect(slider,SIGNAL(valueChanged(int)),this,SLOT(updateText(int)));
}
@ -96,7 +95,6 @@ void YACReaderSlider::focusOutEvent(QFocusEvent * event)
void YACReaderSlider::updateText(int value)
{
percentageLabel->setText(QString("%1 %").arg(value));
Configuration::getConfiguration().setZoomLevel(value);
emit zoomRatioChanged(value);
}