- solved issue with new parameter end_xy when it is None

- solved issue with applying theme and not making the change in the Preferences UI. In Preferences UI the theme radio is always Light (white)
- now the annotations will invert the selected color in the Preferences, when selecting Dark theme
This commit is contained in:
Marius Stanciu
2020-05-06 16:37:48 +03:00
committed by Marius
parent afbe2d974f
commit a161354c25
5 changed files with 96 additions and 107 deletions

View File

@@ -420,13 +420,20 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
def on_theme_change(self):
val = self.theme_radio.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()
@staticmethod
def handle_style(style):