Merge branch 'Beta'

Conflicts:
	flatcamGUI/preferences/general/GeneralGUIPrefGroupUI.py
This commit is contained in:
David Robertson
2020-05-07 02:27:44 +01:00
9 changed files with 580 additions and 371 deletions

View File

@@ -184,13 +184,20 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI2):
def on_theme_change(self):
# FIXME: this should be moved out to a view model
val = self.theme_field.get_value()
qsettings = QSettings("Open Source", "FlatCAM")
qsettings.setValue("theme", val)
# This will write the setting to the platform specific storage.
del qsettings
theme_settings = QtCore.QSettings("Open Source", "FlatCAM")
if theme_settings.contains("theme"):
theme = theme_settings.value('theme', type=str)
else:
theme = 'white'
self.app.on_app_restart()
if val != theme:
theme_settings.setValue("theme", val)
# This will write the setting to the platform specific storage.
del theme_settings
self.app.on_app_restart()
def on_layout(self, index=None, lay=None):
if lay: