Browse Source

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.
QGC4.4
Pritam Ghanghas 9 years ago
parent
commit
ad2ce12bad
  1. 6
      src/ui/MainWindow.cc
  2. 18
      src/ui/MainWindow.ui

6
src/ui/MainWindow.cc

@ -415,6 +415,12 @@ void MainWindow::normalActionItemCallback(bool) @@ -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)

18
src/ui/MainWindow.ui

@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
<x>0</x>
<y>0</y>
<width>1024</width>
<height>22</height>
<height>20</height>
</rect>
</property>
<widget class="QMenu" name="menuMGround">
@ -261,21 +261,5 @@ @@ -261,21 +261,5 @@
</hint>
</hints>
</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>
</ui>

Loading…
Cancel
Save