Просмотр исходного кода

- added a final fix that allow full coverage of the screen in FullScreen in Windows and still the menus are working

Marius Stanciu 6 лет назад
Родитель
Сommit
9eefec7498
2 измененных файлов с 13 добавлено и 1 удалено
  1. 12 1
      FlatCAMApp.py
  2. 1 0
      README.md

+ 12 - 1
FlatCAMApp.py

@@ -5568,7 +5568,18 @@ class App(QtCore.QObject):
             self.y_pos = a.y()
             self.width = a.width()
             self.height = a.height()
-            self.ui.showMaximized()
+
+            # set new geometry to full desktop rect
+            # Subtracting and adding the pixels below it's hack to bypass a bug in Qt5 and OpenGL that made that a
+            # window drawn with OpenGL in fullscreen will not show any other windows on top which means that menus and
+            # everything else will not work without this hack. This happen in Windows.
+            # https://bugreports.qt.io/browse/QTBUG-41309
+            rec = QtWidgets.QApplication.desktop().screenGeometry()
+            h = rec.height() + 2
+            w = rec.width() + 2
+            self.ui.setGeometry(-1, -1, w, h)
+            self.ui.show()
+
             for tb in self.ui.findChildren(QtWidgets.QToolBar):
                 tb.setVisible(False)
             self.ui.splitter_left.setVisible(False)

+ 1 - 0
README.md

@@ -19,6 +19,7 @@ CAD program, and create G-Code for Isolation routing.
 - updated strings in the translations and the .POT file
 - added the new keywords to the default keywords list
 - fixed the FullScreen option not working for the 3D graphic engine (due bug of Qt5 when OpenGL window is fullscreen) by creating a sort of fullscreen
+- added a final fix that allow full coverage of the screen in FullScreen in Windows and still the menus are working
 
 22.09.2019