mirror of
https://github.com/YACReader/yacreader
synced 2025-05-27 19:00:29 -04:00
Add setting to disable the continue reading banner in the grid view
This commit is contained in:
parent
901d0ab03a
commit
4f4c562a33
@ -446,7 +446,8 @@ void GridComicsView::setCurrentComicIfNeeded()
|
||||
|
||||
bool showCurrentComic = found &&
|
||||
filterEnabled == false &&
|
||||
(mode == ComicModel::Mode::Folder || mode == ComicModel::Mode::ReadingList);
|
||||
(mode == ComicModel::Mode::Folder || mode == ComicModel::Mode::ReadingList) &&
|
||||
settings->value(DISPLAY_CONTINUE_READING_IN_GRID_VIEW, true).toBool();
|
||||
|
||||
if (showCurrentComic) {
|
||||
ctxt->setContextProperty("currentComic", ¤tComic);
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include "yacreader_flow_config_widget.h"
|
||||
#include "api_key_dialog.h"
|
||||
|
||||
#include "yacreader_global_gui.h"
|
||||
|
||||
#ifndef NO_OPENGL
|
||||
FlowType flowType = Strip;
|
||||
#endif
|
||||
@ -80,7 +82,16 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
auto gridBackgroundGroup = new QGroupBox(tr("Background"));
|
||||
gridBackgroundGroup->setLayout(gridBackgroundLayout);
|
||||
|
||||
displayContinueReadingBannerCheck = new QCheckBox(tr("Display continue reading banner"));
|
||||
|
||||
auto continueReadingLayout = new QVBoxLayout();
|
||||
continueReadingLayout->addWidget(displayContinueReadingBannerCheck);
|
||||
|
||||
auto continueReadingGroup = new QGroupBox(tr("Continue reading"));
|
||||
continueReadingGroup->setLayout(continueReadingLayout);
|
||||
|
||||
gridViewLayout->addWidget(gridBackgroundGroup);
|
||||
gridViewLayout->addWidget(continueReadingGroup);
|
||||
gridViewLayout->addStretch();
|
||||
|
||||
connect(useBackgroundImageCheck, SIGNAL(clicked(bool)), this, SLOT(useBackgroundImageCheckClicked(bool)));
|
||||
@ -90,6 +101,12 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
connect(resetButton, &QPushButton::clicked, this, &OptionsDialog::resetToDefaults);
|
||||
//end grid view background config
|
||||
|
||||
connect(displayContinueReadingBannerCheck, &QCheckBox::clicked, this, [this]() {
|
||||
this->settings->setValue(DISPLAY_CONTINUE_READING_IN_GRID_VIEW, this->displayContinueReadingBannerCheck->isChecked());
|
||||
|
||||
emit optionsChanged();
|
||||
});
|
||||
|
||||
auto comicFlowW = new QWidget;
|
||||
comicFlowW->setLayout(flowLayout);
|
||||
|
||||
@ -141,6 +158,8 @@ void OptionsDialog::restoreOptions(QSettings *settings)
|
||||
opacityLabel->setVisible(useBackgroundImage);
|
||||
blurLabel->setVisible(useBackgroundImage);
|
||||
useCurrentComicCoverCheck->setVisible(useBackgroundImage);
|
||||
|
||||
displayContinueReadingBannerCheck->setChecked(settings->value(DISPLAY_CONTINUE_READING_IN_GRID_VIEW, true).toBool());
|
||||
}
|
||||
|
||||
void OptionsDialog::useBackgroundImageCheckClicked(bool checked)
|
||||
|
@ -34,6 +34,8 @@ private:
|
||||
QLabel *opacityLabel;
|
||||
QLabel *blurLabel;
|
||||
QPushButton *resetButton;
|
||||
|
||||
QCheckBox *displayContinueReadingBannerCheck;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -5,11 +5,6 @@
|
||||
|
||||
#define VERSION "9.5.0"
|
||||
|
||||
#define USE_BACKGROUND_IMAGE_IN_GRID_VIEW "USE_BACKGROUND_IMAGE_IN_GRID_VIEW"
|
||||
#define OPACITY_BACKGROUND_IMAGE_IN_GRID_VIEW "OPACITY_BACKGROUND_IMAGE_IN_GRID_VIEW"
|
||||
#define BLUR_RADIUS_BACKGROUND_IMAGE_IN_GRID_VIEW "BLUR_RADIUS_BACKGROUND_IMAGE_IN_GRID_VIEW"
|
||||
#define USE_SELECTED_COMIC_COVER_AS_BACKGROUND_IMAGE_IN_GRID_VIEW "USE_SELECTED_COMIC_COVER_AS_BACKGROUND_IMAGE_IN_GRID_VIEW"
|
||||
|
||||
#define REMOTE_BROWSE_PERFORMANCE_WORKAROUND "REMOTE_BROWSE_PERFORMANCE_WORKAROUND"
|
||||
|
||||
#define NUM_DAYS_BETWEEN_VERSION_CHECKS "NUM_DAYS_BETWEEN_VERSION_CHECKS"
|
||||
|
@ -61,6 +61,12 @@
|
||||
#define COMIC_VINE_API_KEY "COMIC_VINE_API_KEY"
|
||||
#define COMIC_VINE_BASE_URL "COMIC_VINE_BASE_URL"
|
||||
|
||||
#define USE_BACKGROUND_IMAGE_IN_GRID_VIEW "USE_BACKGROUND_IMAGE_IN_GRID_VIEW"
|
||||
#define OPACITY_BACKGROUND_IMAGE_IN_GRID_VIEW "OPACITY_BACKGROUND_IMAGE_IN_GRID_VIEW"
|
||||
#define BLUR_RADIUS_BACKGROUND_IMAGE_IN_GRID_VIEW "BLUR_RADIUS_BACKGROUND_IMAGE_IN_GRID_VIEW"
|
||||
#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"
|
||||
|
||||
namespace YACReader {
|
||||
|
||||
static const QString YACReaderLibrarComiscSelectionMimeDataFormat = "application/yacreaderlibrary-comics-ids";
|
||||
|
Loading…
Reference in New Issue
Block a user