Wrap functionality

This commit is contained in:
Luis Ángel San Martín 2022-10-15 12:46:17 +02:00
parent 2093c072b6
commit 928afa4675
3 changed files with 23 additions and 4 deletions

View File

@ -2259,7 +2259,7 @@ void LibraryWindow::toFullScreen()
setGeometry(r);
show();
contentViewsManager->comicsView->toFullScreen();
contentViewsManager->toFullscreen();
}
void LibraryWindow::toNormal()
@ -2275,7 +2275,7 @@ void LibraryWindow::toNormal()
if (fromMaximized)
showMaximized();
contentViewsManager->comicsView->toNormal();
contentViewsManager->toNormal();
}
#else
@ -2287,7 +2287,7 @@ void LibraryWindow::toFullScreen()
sideBar->hide();
libraryToolBar->hide();
contentViewsManager->comicsView->toFullScreen();
contentViewsManager->toFullScreen();
showFullScreen();
}
@ -2296,7 +2296,7 @@ void LibraryWindow::toNormal()
{
sideBar->show();
contentViewsManager->comicsView->toNormal();
contentViewsManager->toNormal();
if (fromMaximized)
showMaximized();

View File

@ -79,6 +79,22 @@ void YACReaderContentViewsManager::updateContinueReadingView()
}
}
void YACReaderContentViewsManager::toFullscreen()
{
if (comicsViewStack->currentWidget() == comicsView) {
comicsView->toFullScreen();
return;
}
}
void YACReaderContentViewsManager::toNormal()
{
if (comicsViewStack->currentWidget() == comicsView) {
comicsView->toNormal();
return;
}
}
void YACReaderContentViewsManager::showComicsView()
{
comicsViewStack->setCurrentWidget(comicsView);

View File

@ -42,6 +42,9 @@ public:
void updateCurrentComicView();
void updateContinueReadingView();
void toFullscreen();
void toNormal();
protected:
QStackedWidget *comicsViewStack;
LibraryWindow *libraryWindow;