diff --git a/FlatCAMApp.py b/FlatCAMApp.py index e796a181..0106552d 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -2616,7 +2616,7 @@ class App(QtCore.QObject): factory_defaults = json.loads(fac_def_from_file) # if the file contain an empty dictionary then save the factory defaults into the file - if not factory_defaults: + if self.defaults["first_run"] is True: self.save_factory_defaults(silent_message=False) # ONLY AT FIRST STARTUP INIT THE GUI LAYOUT TO 'COMPACT' diff --git a/README.md b/README.md index cd111ac7..6036bb8e 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ CAD program, and create G-Code for Isolation routing. - added a script to remove the bad profiles from resource pictures. From here: https://stackoverflow.com/questions/22745076/libpng-warning-iccp-known-incorrect-srgb-profile/43415650, link mentioned by @camellan (Andrey Kultyapov) - prepared the application for usage of dark icons in case of using the dark theme - updated the languages +- fixed a typo +- fixed layout on first launch of the app - RELEASE 8.99 14.12.2019 diff --git a/flatcamGUI/PreferencesUI.py b/flatcamGUI/PreferencesUI.py index 3e9bf22f..dc0c4e1d 100644 --- a/flatcamGUI/PreferencesUI.py +++ b/flatcamGUI/PreferencesUI.py @@ -698,7 +698,18 @@ class GeneralGUISetGroupUI(OptionsGroupUI): self.setTitle(str(_("GUI Settings"))) self.decimals = decimals - + + theme_settings = QtCore.QSettings("Open Source", "FlatCAM") + if theme_settings.contains("theme"): + theme = theme_settings.value('theme', type=str) + else: + theme = 'white' + + if theme == 'white': + self.resource_loc = 'share' + else: + self.resource_loc = 'share' + # Create a form layout for the Application general settings self.form_box = QtWidgets.QFormLayout() @@ -1031,7 +1042,7 @@ class GeneralGUISetGroupUI(OptionsGroupUI): "\n") ) msgbox.setWindowTitle(_("Clear GUI Settings")) - msgbox.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/trash32.png')) + msgbox.setWindowIcon(QtGui.QIcon(self.resource_loc + '/trash32.png')) bt_yes = msgbox.addButton(_('Yes'), QtWidgets.QMessageBox.YesRole) bt_no = msgbox.addButton(_('No'), QtWidgets.QMessageBox.NoRole)