From ad2ce12bad75a5d432afb4ca0c949dacf232250b Mon Sep 17 00:00:00 2001 From: Pritam Ghanghas Date: Fri, 18 Dec 2015 23:56:25 +0530 Subject: [PATCH] Fixed a small irritation. Mainwidnow had a shortcut action on escape that was connected to showNormal, which always led to a smaller minimized window irrespective of whether the applicaton was full screen or not. Now it checks and always returns to maximized. --- src/ui/MainWindow.cc | 6 ++++++ src/ui/MainWindow.ui | 18 +----------------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index 86d5773..bacbb63 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -415,6 +415,12 @@ void MainWindow::normalActionItemCallback(bool) if (!_ui.actionNormal->isChecked()) _ui.actionNormal->setChecked(true); _ui.actionFullscreen->setChecked(false); + + // Qt documentation says that just call showNormal and it will return properly + // So calling showMaximized. + if (isFullScreen()) { + showMaximized(); + } } void MainWindow::showStatusBarCallback(bool checked) diff --git a/src/ui/MainWindow.ui b/src/ui/MainWindow.ui index ac57122..efa88c7 100644 --- a/src/ui/MainWindow.ui +++ b/src/ui/MainWindow.ui @@ -51,7 +51,7 @@ 0 0 1024 - 22 + 20 @@ -261,21 +261,5 @@ - - actionNormal - triggered() - MainWindow - showNormal() - - - -1 - -1 - - - 399 - 249 - - -