mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 09:08:20 -04:00
fixed wrong setting being used as reading zoom, ZOOM_LEVEL has to be renamed to FLOW_ZOOM_LEVEL
This commit is contained in:
parent
be0ef4f20f
commit
13275933c8
@ -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()); }
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user