Skip to content

Commit

Permalink
show toolbar only when it had been present before (#3430)
Browse files Browse the repository at this point in the history
  • Loading branch information
octaeder authored Dec 17, 2023
1 parent abb82eb commit 526d079
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit 526d079

Please sign in to comment.