Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdf-viewer: On return from fullscreen/presentation show toolbar only when it had been present before #3430

Merged
merged 1 commit into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/pdfviewer/PDFDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4475,6 +4475,7 @@ void PDFDocument::toggleFullScreen(bool fullscreen)
if (fullscreen) {
// entering full-screen mode
wasContinuous = actionContinuous->isChecked();
wasShowToolBar = toolBar->isVisible();
pdfWidget->saveState();
statusBar()->hide();
toolBar->hide();
Expand Down Expand Up @@ -4506,7 +4507,7 @@ void PDFDocument::toggleFullScreen(bool fullscreen)
// exiting full-screen mode
statusBar()->show();
if (wasContinuous) actionContinuous->setChecked(true);
toolBar->show();
if (wasShowToolBar) toolBar->show();
if (globalConfig->windowMaximized)
showMaximized();
else
Expand Down
1 change: 1 addition & 0 deletions src/pdfviewer/PDFDocument.h
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ private slots:
PDFDock *dwClock, *dwOutline, *dwFonts, *dwInfo, *dwOverview;
bool dwVisOutline, dwVisFonts, dwVisInfo, dwVisSearch, dwVisOverview;
bool wasContinuous;
bool wasShowToolBar;
PDFSearchDock *dwSearch;

PDFSearchResult lastSearchResult;
Expand Down