Clean up code tracking fullscreen state

Authored by rkflx on Feb 9 2018, 5:20 PM.

Description

Clean up code tracking fullscreen state

Summary:
After syncing Gwenview's fullscreen mode with that of the window manager
in 0d917337122f, 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).
    • 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

Details

Committed
rkflxFeb 11 2018, 11:20 PM
Reviewer
muhlenpfordt
Differential Revision
D10412: Clean up code tracking fullscreen state
Parents
R260:0d917337122f: Keep Gwenview fullscreen mode in sync with window manager
Branches
Unknown
Tags
Unknown