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

- fixed the fullscreen method to show the application window in fullscreen wherever the mouse pointer it is therefore on the screen we are working on; before it was showing always on the primary screen

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

+ 7 - 2
FlatCAMApp.py

@@ -5577,10 +5577,15 @@ class App(QtCore.QObject):
             # window drawn with OpenGL in fullscreen will not show any other windows on top which means that menus and
             # 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.
             # everything else will not work without this hack. This happen in Windows.
             # https://bugreports.qt.io/browse/QTBUG-41309
             # https://bugreports.qt.io/browse/QTBUG-41309
-            rec = QtWidgets.QApplication.desktop().screenGeometry()
+            desktop = QtWidgets.QApplication.desktop()
+            screen = desktop.screenNumber(QtGui.QCursor.pos())
+
+            rec = desktop.screenGeometry(screen)
+            x = rec.x() - 1
+            y = rec.y() - 1
             h = rec.height() + 2
             h = rec.height() + 2
             w = rec.width() + 2
             w = rec.width() + 2
-            self.ui.setGeometry(-1, -1, w, h)
+            self.ui.setGeometry(x, y, w, h)
             self.ui.show()
             self.ui.show()
 
 
             for tb in self.ui.findChildren(QtWidgets.QToolBar):
             for tb in self.ui.findChildren(QtWidgets.QToolBar):

+ 4 - 0
README.md

@@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing.
 
 
 =================================================
 =================================================
 
 
+24.09.2019
+
+- fixed the fullscreen method to show the application window in fullscreen wherever the mouse pointer it is therefore on the screen we are working on; before it was showing always on the primary screen
+
 23.09.2019
 23.09.2019
 
 
 - in legacy graphic engine, fixed bug that made the old object disappear when a new object was loaded
 - in legacy graphic engine, fixed bug that made the old object disappear when a new object was loaded