diff --git a/CHANGELOG.md b/CHANGELOG.md index 653f9af9..e76a4978 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,13 @@ spanish only. Sorry for the mess. Version counting is based on semantic versioning (Major.Feature.Patch) -## 9.7.0 (unreleased) +## WIP + +## 9.7.1 +### YACReader +* Fix enlargement/stretching default value + +## 9.7.0 ### YACReader * Image enlargement/stretching can now be disabled for fit to width and height diff --git a/YACReader/configuration.h b/YACReader/configuration.h index 0c35dbc1..b74d18c1 100644 --- a/YACReader/configuration.h +++ b/YACReader/configuration.h @@ -64,6 +64,8 @@ public: void setDoublePage(bool b) { settings->setValue(DOUBLE_PAGE, b); } bool getDoubleMangaPage() { return settings->value(DOUBLE_MANGA_PAGE).toBool(); } void setDoubleMangaPage(bool b) { settings->setValue(DOUBLE_MANGA_PAGE, b); } + bool getEnlargeImages() { return settings->value(ENLARGE_IMAGES, true).toBool(); } + void setEnlargeImages(bool b) { settings->setValue(ENLARGE_IMAGES, b); } QColor getBackgroundColor() { return settings->value(BACKGROUND_COLOR).value(); } void setBackgroundColor(const QColor &color) { settings->value(BACKGROUND_COLOR, color); } diff --git a/YACReader/options_dialog.cpp b/YACReader/options_dialog.cpp index e69c727b..92f974ad 100644 --- a/YACReader/options_dialog.cpp +++ b/YACReader/options_dialog.cpp @@ -139,7 +139,7 @@ OptionsDialog::OptionsDialog(QWidget *parent) scaleCheckbox = new QCheckBox(tr("Enlarge images to fit width/height")); connect(scaleCheckbox, &QCheckBox::clicked, [=](bool checked) { - settings->setValue(ENLARGE_IMAGES, checked); + Configuration::getConfiguration().setEnlargeImages(checked); emit(changedImageOptions()); }); diff --git a/YACReader/viewer.cpp b/YACReader/viewer.cpp index 50dc0971..dd9e27bd 100644 --- a/YACReader/viewer.cpp +++ b/YACReader/viewer.cpp @@ -317,7 +317,7 @@ void Viewer::updateContentSize() //there is an image to resize if (currentPage != nullptr && !currentPage->isNull()) { QSize pagefit = currentPage->size(); - bool stretchImages = Configuration::getConfiguration().getSettings()->value(ENLARGE_IMAGES).toBool(); + bool stretchImages = Configuration::getConfiguration().getEnlargeImages(); YACReader::FitMode fitmode = Configuration::getConfiguration().getFitMode(); switch (fitmode) { case YACReader::FitMode::FullRes: diff --git a/common/yacreader_global.h b/common/yacreader_global.h index 2d8cecdc..e52d73a7 100644 --- a/common/yacreader_global.h +++ b/common/yacreader_global.h @@ -3,7 +3,7 @@ #include -#define VERSION "9.7.0" +#define VERSION "9.7.1" #define REMOTE_BROWSE_PERFORMANCE_WORKAROUND "REMOTE_BROWSE_PERFORMANCE_WORKAROUND" diff --git a/common/yacreader_global_gui.h b/common/yacreader_global_gui.h index 6b949437..47e205d7 100644 --- a/common/yacreader_global_gui.h +++ b/common/yacreader_global_gui.h @@ -32,6 +32,7 @@ #define SHOW_INFO "SHOW_INFO" #define QUICK_NAVI_MODE "QUICK_NAVI_MODE" #define DISABLE_MOUSE_OVER_GOTO_FLOW "DISABLE_MOUSE_OVER_GOTO_FLOW" +#define ENLARGE_IMAGES "ENLARGE_IMAGES" #define FLOW_TYPE_GL "FLOW_TYPE_GL" #define Y_POSITION "Y_POSITION" @@ -70,8 +71,6 @@ #define USE_SELECTED_COMIC_COVER_AS_BACKGROUND_IMAGE_IN_GRID_VIEW "USE_SELECTED_COMIC_COVER_AS_BACKGROUND_IMAGE_IN_GRID_VIEW" #define DISPLAY_CONTINUE_READING_IN_GRID_VIEW "DISPLAY_CONTINUE_READING_IN_GRID_VIEW" -#define ENLARGE_IMAGES "ENLARGE_IMAGES" - namespace YACReader { static const QString YACReaderLibrarComiscSelectionMimeDataFormat = "application/yacreaderlibrary-comics-ids";