Commit ad2ce12b authored by Pritam Ghanghas's avatar Pritam Ghanghas

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.
parent 46604020
...@@ -415,6 +415,12 @@ void MainWindow::normalActionItemCallback(bool) ...@@ -415,6 +415,12 @@ void MainWindow::normalActionItemCallback(bool)
if (!_ui.actionNormal->isChecked()) if (!_ui.actionNormal->isChecked())
_ui.actionNormal->setChecked(true); _ui.actionNormal->setChecked(true);
_ui.actionFullscreen->setChecked(false); _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) void MainWindow::showStatusBarCallback(bool checked)
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1024</width> <width>1024</width>
<height>22</height> <height>20</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuMGround"> <widget class="QMenu" name="menuMGround">
...@@ -261,21 +261,5 @@ ...@@ -261,21 +261,5 @@
</hint> </hint>
</hints> </hints>
</connection> </connection>
<connection>
<sender>actionNormal</sender>
<signal>triggered()</signal>
<receiver>MainWindow</receiver>
<slot>showNormal()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>399</x>
<y>249</y>
</hint>
</hints>
</connection>
</connections> </connections>
</ui> </ui>
Markdown is supported
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