Application wide updates for dark mode support including dark canvas option and better colors
This commit is contained in:
@@ -54,9 +54,14 @@ class PlotCanvas(QtCore.QObject, VisPyCanvas):
|
||||
if settings.contains("theme"):
|
||||
theme = settings.value('theme', type=str)
|
||||
else:
|
||||
theme = 'white'
|
||||
theme = 'light'
|
||||
|
||||
if theme == 'white':
|
||||
if settings.contains("dark_canvas"):
|
||||
dark_canvas = settings.value('dark_canvas', type=bool)
|
||||
else:
|
||||
dark_canvas = True
|
||||
|
||||
if theme == 'light' and not dark_canvas:
|
||||
self.line_color = (0.3, 0.0, 0.0, 1.0)
|
||||
# self.rect_hud_color = Color('#0000FF10')
|
||||
self.rect_hud_color = Color('#80808040')
|
||||
@@ -384,9 +389,14 @@ class PlotCanvas(QtCore.QObject, VisPyCanvas):
|
||||
if settings.contains("theme"):
|
||||
theme = settings.value('theme', type=str)
|
||||
else:
|
||||
theme = 'white'
|
||||
theme = 'light'
|
||||
|
||||
if theme == 'white':
|
||||
if settings.contains("dark_canvas"):
|
||||
dark_canvas = settings.value('dark_canvas', type=bool)
|
||||
else:
|
||||
dark_canvas = True
|
||||
|
||||
if theme == 'light' and not dark_canvas:
|
||||
color = 'dimgray'
|
||||
else:
|
||||
color = '#dededeff'
|
||||
@@ -712,7 +722,7 @@ class CursorBig(QtCore.QObject):
|
||||
# if 'edge_color' in kwargs:
|
||||
# color = kwargs['edge_color']
|
||||
# else:
|
||||
# if self.app.options['global_theme'] == 'white':
|
||||
# if self.app.options['global_theme'] == 'light':
|
||||
# color = '#000000FF'
|
||||
# else:
|
||||
# color = '#FFFFFFFF'
|
||||
|
||||
Reference in New Issue
Block a user