Skip to content
Commit 140393d0 authored by rk flx's avatar rk flx
Browse files

Clean up code tracking fullscreen state

Summary:
After syncing Gwenview's fullscreen mode with that of the window manager
in 0d917337, we can just ask the window for its fullscreen state
instead of having to track this for ourselves.

This gets rid of a bunch of `bools` and reduces chances those might
accidentally get out of sync at some point. In addition, we can
eliminate duplication and dependence on execution order in
`MainWindow::toggleFullScreen`.

Test Plan:
- `qDebug()` comparing `mFullScreenMode` and `window()->isFullscreen()`
- Manual testing of every functionality affected:
  - Switching to and from fullscreen mode (both via Gwenview and window manager).
  - {key Esc} to exit fullscreen mode.
  - Special fullscreen toolbar works.
  - Toggling sidebar resizes fullscreen toolbar.
  - Sidebar state remembered separately for normal and fullscreen mode.
  - Savebar not visible in fullscreen mode.
  - Memory warning bar still works in fullscreen mode.

Reviewers: muhlenpfordt

Reviewed By: muhlenpfordt

Differential Revision: https://phabricator.kde.org/D10412
parent 0d917337
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment