From acce89ef78c77b40c74f055d726b150dea315879 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann Date: Mon, 7 Sep 2020 08:54:23 +0200 Subject: [PATCH 1/6] Update viewer.cpp --- YACReader/viewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YACReader/viewer.cpp b/YACReader/viewer.cpp index 50dc0971..eaa96381 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().getSettings()->value(ENLARGE_IMAGES, true).toBool(); YACReader::FitMode fitmode = Configuration::getConfiguration().getFitMode(); switch (fitmode) { case YACReader::FitMode::FullRes: From c490b70b682ce685e5c2b9bc08e424527510e93c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Mon, 7 Sep 2020 18:13:06 +0200 Subject: [PATCH 2/6] Move declaration to the viewer group --- common/yacreader_global_gui.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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"; From 6738827798d8885f79395748deaf9dcb1bd35d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Mon, 7 Sep 2020 18:13:43 +0200 Subject: [PATCH 3/6] Add methods to access ENLARGE_IMAGES setting --- YACReader/configuration.h | 2 ++ 1 file changed, 2 insertions(+) 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); } From 4739376f5bd18d4862ee23862516ab8f2bf60c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Mon, 7 Sep 2020 18:13:55 +0200 Subject: [PATCH 4/6] Use new methods --- YACReader/options_dialog.cpp | 2 +- YACReader/viewer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 eaa96381..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, true).toBool(); + bool stretchImages = Configuration::getConfiguration().getEnlargeImages(); YACReader::FitMode fitmode = Configuration::getConfiguration().getFitMode(); switch (fitmode) { case YACReader::FitMode::FullRes: From d22e3a4490916d20a6fe5c8d4b5642e2397cfcc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Mon, 7 Sep 2020 18:15:40 +0200 Subject: [PATCH 5/6] Update CHANGELOG --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 653f9af9..a1ccdcf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ spanish only. Sorry for the mess. Version counting is based on semantic versioning (Major.Feature.Patch) -## 9.7.0 (unreleased) +## WIP +### YACReader +* Fix enlargement/stretching default value + +## 9.7.0 ### YACReader * Image enlargement/stretching can now be disabled for fit to width and height From 948ed595e7906e678db824311994d8efed3f5627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 12 Sep 2020 12:02:55 +0200 Subject: [PATCH 6/6] Bump version number to 9.7.1 --- CHANGELOG.md | 2 ++ common/yacreader_global.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1ccdcf7..e76a4978 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ spanish only. Sorry for the mess. Version counting is based on semantic versioning (Major.Feature.Patch) ## WIP + +## 9.7.1 ### YACReader * Fix enlargement/stretching default value 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"