- changed the grid colors for 3D graphic engine when in Dark mode
This commit is contained in:
@@ -5943,10 +5943,18 @@ class App(QtCore.QObject):
|
|||||||
def on_toggle_grid_lines(self):
|
def on_toggle_grid_lines(self):
|
||||||
self.report_usage("on_toggle_grd_lines()")
|
self.report_usage("on_toggle_grd_lines()")
|
||||||
|
|
||||||
|
settings = QtCore.QSettings("Open Source", "FlatCAM")
|
||||||
|
if settings.contains("theme"):
|
||||||
|
theme = settings.value('theme', type=str)
|
||||||
|
else:
|
||||||
|
theme = 'white'
|
||||||
|
|
||||||
if self.toggle_grid_lines is False:
|
if self.toggle_grid_lines is False:
|
||||||
if self.is_legacy is False:
|
if self.is_legacy is False:
|
||||||
self.plotcanvas.grid._grid_color_fn['color'] = Color('dimgray').rgba
|
if theme == 'white':
|
||||||
|
self.plotcanvas.grid._grid_color_fn['color'] = Color('dimgray').rgba
|
||||||
|
else:
|
||||||
|
self.plotcanvas.grid._grid_color_fn['color'] = Color('#FFFFFFFF').rgba
|
||||||
else:
|
else:
|
||||||
self.plotcanvas.axes.grid(True)
|
self.plotcanvas.axes.grid(True)
|
||||||
try:
|
try:
|
||||||
@@ -5957,7 +5965,10 @@ class App(QtCore.QObject):
|
|||||||
self.toggle_grid_lines = True
|
self.toggle_grid_lines = True
|
||||||
else:
|
else:
|
||||||
if self.is_legacy is False:
|
if self.is_legacy is False:
|
||||||
self.plotcanvas.grid._grid_color_fn['color'] = Color('#FFFFFFFF').rgba
|
if theme == 'white':
|
||||||
|
self.plotcanvas.grid._grid_color_fn['color'] = Color('#dededeff').rgba
|
||||||
|
else:
|
||||||
|
self.plotcanvas.grid._grid_color_fn['color'] = Color('#000000FF').rgba
|
||||||
else:
|
else:
|
||||||
self.plotcanvas.axes.grid(False)
|
self.plotcanvas.axes.grid(False)
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
- fixed a bug in the Merge functions
|
- fixed a bug in the Merge functions
|
||||||
- fixed the Export PNG function when using the 2D legacy graphic engine
|
- fixed the Export PNG function when using the 2D legacy graphic engine
|
||||||
- added a new capability to toggle the grid lines for both graphic engines: menu link in View and key shortcut combo ALT+G
|
- added a new capability to toggle the grid lines for both graphic engines: menu link in View and key shortcut combo ALT+G
|
||||||
|
- changed the grid colors for 3D graphic engine when in Dark mode
|
||||||
|
|
||||||
12.10.2019
|
12.10.2019
|
||||||
|
|
||||||
|
|||||||
@@ -86,8 +86,18 @@ class VisPyCanvas(scene.SceneCanvas):
|
|||||||
# grid1 = scene.GridLines(parent=view.scene, color='dimgray')
|
# grid1 = scene.GridLines(parent=view.scene, color='dimgray')
|
||||||
# grid1.set_gl_state(depth_test=False)
|
# grid1.set_gl_state(depth_test=False)
|
||||||
|
|
||||||
|
settings = QSettings("Open Source", "FlatCAM")
|
||||||
|
if settings.contains("theme"):
|
||||||
|
theme = settings.value('theme', type=str)
|
||||||
|
else:
|
||||||
|
theme = 'white'
|
||||||
|
|
||||||
self.view = view
|
self.view = view
|
||||||
self.grid = scene.GridLines(parent=self.view.scene, color='dimgray')
|
if theme == 'white':
|
||||||
|
self.grid = scene.GridLines(parent=self.view.scene, color='dimgray')
|
||||||
|
else:
|
||||||
|
self.grid = scene.GridLines(parent=self.view.scene, color='#dededeff')
|
||||||
|
|
||||||
self.grid.set_gl_state(depth_test=False)
|
self.grid.set_gl_state(depth_test=False)
|
||||||
|
|
||||||
self.freeze()
|
self.freeze()
|
||||||
|
|||||||
Reference in New Issue
Block a user