- 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
This commit is contained in:
@@ -2484,6 +2484,12 @@ class App(QtCore.QObject):
|
|||||||
self.isHovering = False
|
self.isHovering = False
|
||||||
self.notHovering = True
|
self.notHovering = True
|
||||||
|
|
||||||
|
# Window geometry
|
||||||
|
self.x_pos = None
|
||||||
|
self.y_pos = None
|
||||||
|
self.width = None
|
||||||
|
self.height = None
|
||||||
|
|
||||||
# Event signals disconnect id holders
|
# Event signals disconnect id holders
|
||||||
self.mp = None
|
self.mp = None
|
||||||
self.mm = None
|
self.mm = None
|
||||||
@@ -3773,6 +3779,16 @@ class App(QtCore.QObject):
|
|||||||
self.defaults["global_def_notebook_width"] = notebook_width
|
self.defaults["global_def_notebook_width"] = notebook_width
|
||||||
self.save_defaults()
|
self.save_defaults()
|
||||||
|
|
||||||
|
def restore_main_win_geom(self):
|
||||||
|
try:
|
||||||
|
self.ui.setGeometry(self.defaults["global_def_win_x"],
|
||||||
|
self.defaults["global_def_win_y"],
|
||||||
|
self.defaults["global_def_win_w"],
|
||||||
|
self.defaults["global_def_win_h"])
|
||||||
|
self.ui.splitter.setSizes([self.defaults["global_def_notebook_width"], 0])
|
||||||
|
except KeyError as e:
|
||||||
|
log.debug("App.restore_main_win_geom() --> %s" % str(e))
|
||||||
|
|
||||||
def message_dialog(self, title, message, kind="info"):
|
def message_dialog(self, title, message, kind="info"):
|
||||||
"""
|
"""
|
||||||
Builds and show a custom QMessageBox to be used in FlatCAM.
|
Builds and show a custom QMessageBox to be used in FlatCAM.
|
||||||
@@ -5545,15 +5561,22 @@ class App(QtCore.QObject):
|
|||||||
self.report_usage("on_fullscreen()")
|
self.report_usage("on_fullscreen()")
|
||||||
|
|
||||||
if self.toggle_fscreen is False:
|
if self.toggle_fscreen is False:
|
||||||
if sys.platform == 'win32':
|
# self.ui.showFullScreen()
|
||||||
self.ui.showFullScreen()
|
self.ui.setWindowFlags(self.ui.windowFlags() | Qt.WindowStaysOnTopHint | Qt.FramelessWindowHint)
|
||||||
|
a = self.ui.geometry()
|
||||||
|
self.x_pos = a.x()
|
||||||
|
self.y_pos = a.y()
|
||||||
|
self.width = a.width()
|
||||||
|
self.height = a.height()
|
||||||
|
self.ui.showMaximized()
|
||||||
for tb in self.ui.findChildren(QtWidgets.QToolBar):
|
for tb in self.ui.findChildren(QtWidgets.QToolBar):
|
||||||
tb.setVisible(False)
|
tb.setVisible(False)
|
||||||
self.ui.splitter_left.setVisible(False)
|
self.ui.splitter_left.setVisible(False)
|
||||||
self.toggle_fscreen = True
|
self.toggle_fscreen = True
|
||||||
else:
|
else:
|
||||||
if sys.platform == 'win32':
|
self.ui.setWindowFlags(self.ui.windowFlags() & ~Qt.WindowStaysOnTopHint & ~Qt.FramelessWindowHint)
|
||||||
self.ui.showNormal()
|
self.ui.setGeometry(self.x_pos, self.y_pos, self.width, self.height)
|
||||||
|
self.ui.showNormal()
|
||||||
self.restore_toolbar_view()
|
self.restore_toolbar_view()
|
||||||
self.ui.splitter_left.setVisible(True)
|
self.ui.splitter_left.setVisible(True)
|
||||||
self.toggle_fscreen = False
|
self.toggle_fscreen = False
|
||||||
@@ -10508,16 +10531,6 @@ class App(QtCore.QObject):
|
|||||||
if silent is False:
|
if silent is False:
|
||||||
self.log.debug(" " + param + " OK!")
|
self.log.debug(" " + param + " OK!")
|
||||||
|
|
||||||
def restore_main_win_geom(self):
|
|
||||||
try:
|
|
||||||
self.ui.setGeometry(self.defaults["global_def_win_x"],
|
|
||||||
self.defaults["global_def_win_y"],
|
|
||||||
self.defaults["global_def_win_w"],
|
|
||||||
self.defaults["global_def_win_h"])
|
|
||||||
self.ui.splitter.setSizes([self.defaults["global_def_notebook_width"], 0])
|
|
||||||
except KeyError as e:
|
|
||||||
log.debug("App.restore_main_win_geom() --> %s" % str(e))
|
|
||||||
|
|
||||||
def plot_all(self, zoom=True):
|
def plot_all(self, zoom=True):
|
||||||
"""
|
"""
|
||||||
Re-generates all plots from all objects.
|
Re-generates all plots from all objects.
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
- added a new TclCommand named "bounds" which will return a list of bounds values from a supplied list of objects names. For use in Tcl Scripts
|
- added a new TclCommand named "bounds" which will return a list of bounds values from a supplied list of objects names. For use in Tcl Scripts
|
||||||
- updated strings in the translations and the .POT file
|
- updated strings in the translations and the .POT file
|
||||||
- added the new keywords to the default keywords list
|
- 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
|
||||||
|
|
||||||
22.09.2019
|
22.09.2019
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user