Add support for detecting manga issues in YACReader

When an issues is open from YACReaderLibrary we can check if it is a manga an update the UI to enable manga reading.

This also fixes going previous/next from the ui/shortcuts
This commit is contained in:
Luis Ángel San Martín
2021-01-16 14:29:00 +01:00
parent 9643274b39
commit 611d4c5e26
6 changed files with 125 additions and 27 deletions

View File

@ -253,6 +253,24 @@ void Viewer::next()
shouldOpenPrevious = false;
}
void Viewer::left()
{
if (doubleMangaPage) {
next();
} else {
prev();
}
}
void Viewer::right()
{
if (doubleMangaPage) {
prev();
} else {
next();
}
}
void Viewer::prev()
{
direction = -1;
@ -889,6 +907,14 @@ void Viewer::doublePageSwitch()
Configuration::getConfiguration().setDoublePage(doublePage);
}
void Viewer::setMangaWithoutStoringSetting(bool manga)
{
doubleMangaPage = manga;
render->setManga(manga);
goToFlow->setFlowRightToLeft(doubleMangaPage);
//goToFlow->updateConfig(config.getSettings());
}
void Viewer::doubleMangaPageSwitch()
{
doubleMangaPage = !doubleMangaPage;
@ -1026,6 +1052,11 @@ void Viewer::updateZoomRatio(int ratio)
updateContentSize();
}
bool Viewer::getIsMangaMode()
{
return doubleMangaPage;
}
void Viewer::updateConfig(QSettings *settings)
{
goToFlow->updateConfig(settings);