From 52124567d8b0096d59e736bc9155daca783c250a Mon Sep 17 00:00:00 2001 From: luisangelsm Date: Mon, 29 Dec 2025 13:49:57 +0100 Subject: [PATCH 1/6] Fix last column stretch in the comics table view --- CHANGELOG.md | 5 +++++ YACReaderLibrary/classic_comics_view.cpp | 20 +++++++++++++------- common/yacreader_global.h | 2 +- custom_widgets/whats_new_dialog.cpp | 1 + 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95ffa8fb6..cb0cbb27c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ Version counting is based on semantic versioning (Major.Feature.Patch) +## 9.16.3 (WIP) + +### YACReaderLibrary +* Fix table view last section stretch. Before it was only working randomly. + ## 9.16.2 ### YACReaderLibrary diff --git a/YACReaderLibrary/classic_comics_view.cpp b/YACReaderLibrary/classic_comics_view.cpp index 82494b0e4..ec92c8e6e 100644 --- a/YACReaderLibrary/classic_comics_view.cpp +++ b/YACReaderLibrary/classic_comics_view.cpp @@ -46,8 +46,8 @@ ClassicComicsView::ClassicComicsView(QWidget *parent) stack->addWidget(searchingIcon); sVertical->addWidget(stack); - comics = new QWidget; - auto comicsLayout = new QVBoxLayout; + comics = new QWidget(this); + auto comicsLayout = new QVBoxLayout(this); comicsLayout->setSpacing(0); comicsLayout->setContentsMargins(0, 0, 0, 0); // TODO ComicsView:(set toolbar) comicsLayout->addWidget(editInfoToolBar); @@ -143,6 +143,8 @@ void ClassicComicsView::setModel(ComicModel *model) connect(model, &ComicModel::resortedIndexes, comicFlow, &ComicFlowWidget::resortCovers, Qt::UniqueConnection); connect(model, &ComicModel::newSelectedIndex, this, &ClassicComicsView::setCurrentIndex, Qt::UniqueConnection); + tableView->horizontalHeader()->blockSignals(true); + tableView->setModel(model); if (model->rowCount() > 0) tableView->setCurrentIndex(model->index(0, 0)); @@ -151,15 +153,12 @@ void ClassicComicsView::setModel(ComicModel *model) comicFlow->setImagePaths(paths); comicFlow->setMarks(model->getReadList()); - bool loadDefaults = false; + bool loadDefaults = true; if (settings->contains(COMICS_VIEW_HEADERS)) { try { loadDefaults = !tableView->horizontalHeader()->restoreState(settings->value(COMICS_VIEW_HEADERS).toByteArray()); } catch (...) { - loadDefaults = true; } - } else { - loadDefaults = true; } if (loadDefaults) { @@ -190,10 +189,17 @@ void ClassicComicsView::setModel(ComicModel *model) } } - tableView->resizeColumnsToContents(); tableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); tableView->horizontalHeader()->setSectionsMovable(true); tableView->horizontalHeader()->setStretchLastSection(true); + + for (int i = 0; i < tableView->horizontalHeader()->count() - 1; i++) { + if (!tableView->horizontalHeader()->isSectionHidden(i)) { + tableView->resizeColumnToContents(i); + } + } + + tableView->horizontalHeader()->blockSignals(false); } } diff --git a/common/yacreader_global.h b/common/yacreader_global.h index 04c158f8a..36b1f5d79 100644 --- a/common/yacreader_global.h +++ b/common/yacreader_global.h @@ -9,7 +9,7 @@ class QLibrary; -#define VERSION "9.16.2" +#define VERSION "9.16.3" // Used to check if the database needs to be updated, the version is stored in the database. // This value is only incremented when the database structure changes. diff --git a/custom_widgets/whats_new_dialog.cpp b/custom_widgets/whats_new_dialog.cpp index d0ec925cc..614dceca0 100644 --- a/custom_widgets/whats_new_dialog.cpp +++ b/custom_widgets/whats_new_dialog.cpp @@ -71,6 +71,7 @@ YACReader::WhatsNewDialog::WhatsNewDialog(QWidget *parent) " • Added a customizable User Agent string to use it with Comic Vine. It can be set in YACReaderLibrary.ini in the [ComicVine] section using the COMIC_VINE_USER_AGENT key (new in 9.16.2)
" " • Prevent crash when opening the folders context menu if a folder is not selected. (new in 9.16.2)
" " • Fix crash when using the `Set type` menu on libraries. (new in 9.16.2)
" + " • Fix table view last section stretch. Before it was only working randomly. (new in 9.16.3)
" "
" "YACReaderLibraryServer
" " • Log libraries validation when the app starts
" From 79279759020a6da26b0b185a259e9f5ddb9e030f Mon Sep 17 00:00:00 2001 From: luisangelsm Date: Mon, 29 Dec 2025 19:06:04 +0100 Subject: [PATCH 2/6] Avoid saving a non populated header state for the table view headers This was causing problems loading content on the table view that could persist between sessions. --- CHANGELOG.md | 1 + YACReaderLibrary/classic_comics_view.cpp | 4 ++++ common/yacreader_global_gui.h | 2 +- custom_widgets/whats_new_dialog.cpp | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb0cbb27c..cdf70a0fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Version counting is based on semantic versioning (Major.Feature.Patch) ### YACReaderLibrary * Fix table view last section stretch. Before it was only working randomly. +* Fix empty table view caused by wront state being saved. You'll need to reconfigure the table view headers to your liking after this. ## 9.16.2 diff --git a/YACReaderLibrary/classic_comics_view.cpp b/YACReaderLibrary/classic_comics_view.cpp index ec92c8e6e..5eb2720f0 100644 --- a/YACReaderLibrary/classic_comics_view.cpp +++ b/YACReaderLibrary/classic_comics_view.cpp @@ -353,6 +353,10 @@ void ClassicComicsView::updateTableView(int i) void ClassicComicsView::saveTableHeadersStatus() { + if (model == nullptr) { + return; + } + settings->setValue(COMICS_VIEW_HEADERS, tableView->horizontalHeader()->saveState()); } diff --git a/common/yacreader_global_gui.h b/common/yacreader_global_gui.h index cb7397fa0..a4e667e4a 100644 --- a/common/yacreader_global_gui.h +++ b/common/yacreader_global_gui.h @@ -57,7 +57,7 @@ #define MAIN_WINDOW_GEOMETRY "MAIN_WINDOW_GEOMETRY" #define MAIN_WINDOW_STATE "MAIN_WINDOW_STATE" -#define COMICS_VIEW_HEADERS "COMICS_VIEW_HEADERS_NEW" // VALUE CHANGED IN 9.14 to avoid issues with previous versions +#define COMICS_VIEW_HEADERS "COMICS_VIEW_HEADERS_9.16.3" // VALUE CHANGED IN 9.16.3 to avoid issues with previous versions #define COMICS_VIEW_HEADERS_GEOMETRY "COMICS_VIEW_HEADERS_GEOMETRY" #define COMICS_VIEW_STATUS "COMICS_VIEW_STATUS" #define COMICS_VIEW_FLOW_SPLITTER_STATUS "COMICS_VIEW_FLOW_SPLITTER_STATUS" diff --git a/custom_widgets/whats_new_dialog.cpp b/custom_widgets/whats_new_dialog.cpp index 614dceca0..966997d7a 100644 --- a/custom_widgets/whats_new_dialog.cpp +++ b/custom_widgets/whats_new_dialog.cpp @@ -72,6 +72,7 @@ YACReader::WhatsNewDialog::WhatsNewDialog(QWidget *parent) " • Prevent crash when opening the folders context menu if a folder is not selected. (new in 9.16.2)
" " • Fix crash when using the `Set type` menu on libraries. (new in 9.16.2)
" " • Fix table view last section stretch. Before it was only working randomly. (new in 9.16.3)
" + " • Fix empty table view caused by wront state being saved. You'll need to reconfigure the table view headers to your liking after this udpate. (new in 9.16.3)
" "
" "YACReaderLibraryServer
" " • Log libraries validation when the app starts
" From 54ef16e31819ade25fbe421ed657d83a9bc248c1 Mon Sep 17 00:00:00 2001 From: luisangelsm Date: Tue, 30 Dec 2025 16:14:29 +0100 Subject: [PATCH 3/6] Skip saving table headers status if the model is empty It means the view isn't actually in a a state that can be shown to the user. --- YACReaderLibrary/classic_comics_view.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/YACReaderLibrary/classic_comics_view.cpp b/YACReaderLibrary/classic_comics_view.cpp index 5eb2720f0..66b602b9a 100644 --- a/YACReaderLibrary/classic_comics_view.cpp +++ b/YACReaderLibrary/classic_comics_view.cpp @@ -357,6 +357,10 @@ void ClassicComicsView::saveTableHeadersStatus() return; } + if (model->rowCount() == 0) { + return; + } + settings->setValue(COMICS_VIEW_HEADERS, tableView->horizontalHeader()->saveState()); } From 0ea6885931f4d9684205de2b9b33b1a71a97df26 Mon Sep 17 00:00:00 2001 From: luisangelsm Date: Tue, 30 Dec 2025 19:10:09 +0100 Subject: [PATCH 4/6] Fix current page/time label content when the content is too long. --- CHANGELOG.md | 3 +++ YACReader/page_label_widget.cpp | 2 +- custom_widgets/whats_new_dialog.cpp | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdf70a0fd..04f4c2dca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ Version counting is based on semantic versioning (Major.Feature.Patch) ## 9.16.3 (WIP) +### YACReader +* Fix current page/time label content when the content is too long. + ### YACReaderLibrary * Fix table view last section stretch. Before it was only working randomly. * Fix empty table view caused by wront state being saved. You'll need to reconfigure the table view headers to your liking after this. diff --git a/YACReader/page_label_widget.cpp b/YACReader/page_label_widget.cpp index e0a7ee345..8fd6a4b96 100644 --- a/YACReader/page_label_widget.cpp +++ b/YACReader/page_label_widget.cpp @@ -21,7 +21,7 @@ PageLabelWidget::PageLabelWidget(QWidget *parent) textLabel = new QLabel(this); textLabel->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter); - textLabel->setWordWrap(true); // Allow wrapping + textLabel->setWordWrap(false); // Wrapping needs to be disabled, we need to show all the text in one line int contentMargin = 0; if (verticalRes <= 1024) { diff --git a/custom_widgets/whats_new_dialog.cpp b/custom_widgets/whats_new_dialog.cpp index 966997d7a..4f0e1dccc 100644 --- a/custom_widgets/whats_new_dialog.cpp +++ b/custom_widgets/whats_new_dialog.cpp @@ -52,6 +52,7 @@ YACReader::WhatsNewDialog::WhatsNewDialog(QWidget *parent) " • Don't use scroll animations on macOS by default, where hdpi scroll is most likely to be used
" " • New toolbar on macOS
" " • New mouse modes to turn pages - you can setup the app to use the left/right buttons to turn pages directly or click on the left/right part of the screen to turn pages
" + " • Fix current page/time label content when the content is too long. (new in 9.16.3)
" "
" "YACReaderLibrary
" " • Improve flexibility of the open comic in third party app setting so more complex commands can be used, e.g. `open -a \"/Applications/My Reader.app\" \"{comic_file_path}\"`
" From 380e7162f562e47c6f933a9ca3a6aa7850ba2d21 Mon Sep 17 00:00:00 2001 From: luisangelsm Date: Fri, 2 Jan 2026 11:54:22 +0100 Subject: [PATCH 5/6] Fix open comic shortcut in fullscreen mode --- CHANGELOG.md | 1 + YACReaderLibrary/library_window_actions.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04f4c2dca..0d1ef6f09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Version counting is based on semantic versioning (Major.Feature.Patch) ### YACReaderLibrary * Fix table view last section stretch. Before it was only working randomly. * Fix empty table view caused by wront state being saved. You'll need to reconfigure the table view headers to your liking after this. +* Fix open comic shortcut in fullscreen mode. ## 9.16.2 diff --git a/YACReaderLibrary/library_window_actions.cpp b/YACReaderLibrary/library_window_actions.cpp index 554e5eea1..ad49d1e7b 100644 --- a/YACReaderLibrary/library_window_actions.cpp +++ b/YACReaderLibrary/library_window_actions.cpp @@ -441,6 +441,9 @@ void LibraryWindowActions::createActions(LibraryWindow *window, QSettings *setti addToFavoritesAction->setToolTip(tr("Add selected comics to favorites list")); addToFavoritesAction->setIcon(QIcon(":/images/lists/default_1.svg")); + // global actions + window->addAction(openComicAction); // this fixes opening comics in fullscreen mode using the keyboard shortcut + // actions not asigned to any widget window->addAction(saveCoversToAction); window->addAction(openContainingFolderAction); From 8685290e3eb63c0d157b3b2b689bcf0b9f8cb7ac Mon Sep 17 00:00:00 2001 From: luisangelsm Date: Sat, 3 Jan 2026 18:40:45 +0100 Subject: [PATCH 6/6] 9.16.3 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d1ef6f09..218e335a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Version counting is based on semantic versioning (Major.Feature.Patch) -## 9.16.3 (WIP) +## 9.16.3 ### YACReader * Fix current page/time label content when the content is too long.