Use new methods

This commit is contained in:
Luis Ángel San Martín 2020-09-07 18:13:55 +02:00
parent 6738827798
commit 4739376f5b
2 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
scaleCheckbox = new QCheckBox(tr("Enlarge images to fit width/height")); scaleCheckbox = new QCheckBox(tr("Enlarge images to fit width/height"));
connect(scaleCheckbox, &QCheckBox::clicked, connect(scaleCheckbox, &QCheckBox::clicked,
[=](bool checked) { [=](bool checked) {
settings->setValue(ENLARGE_IMAGES, checked); Configuration::getConfiguration().setEnlargeImages(checked);
emit(changedImageOptions()); emit(changedImageOptions());
}); });

View File

@ -317,7 +317,7 @@ void Viewer::updateContentSize()
//there is an image to resize //there is an image to resize
if (currentPage != nullptr && !currentPage->isNull()) { if (currentPage != nullptr && !currentPage->isNull()) {
QSize pagefit = currentPage->size(); QSize pagefit = currentPage->size();
bool stretchImages = Configuration::getConfiguration().getSettings()->value(ENLARGE_IMAGES, true).toBool(); bool stretchImages = Configuration::getConfiguration().getEnlargeImages();
YACReader::FitMode fitmode = Configuration::getConfiguration().getFitMode(); YACReader::FitMode fitmode = Configuration::getConfiguration().getFitMode();
switch (fitmode) { switch (fitmode) {
case YACReader::FitMode::FullRes: case YACReader::FitMode::FullRes: