From 8b4423dc0fd75707a4d67c95bb27cac32f6125c9 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Wed, 9 Nov 2022 19:55:59 +0200 Subject: [PATCH] - when changing the style for the decorations from Preferences, now change is applied immediately --- CHANGELOG.md | 4 ++++ FlatCAM.py | 2 ++ appGUI/preferences/general/GeneralGUIPrefGroupUI.py | 3 +++ 3 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c640478..7524f35c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ CHANGELOG for FlatCAM Evo beta ================================================= +9.11.2022 + +- when changing the style for the decorations from Preferences, now change is applied immediately + 7.11.2022 - in Drilling Plugin fixed a situation when having tools with the same diameter will get them multiplied by the number of those tools diff --git a/FlatCAM.py b/FlatCAM.py index b09db242..da2f78df 100644 --- a/FlatCAM.py +++ b/FlatCAM.py @@ -157,6 +157,8 @@ if __name__ == '__main__': idx = 0 style = QtWidgets.QStyleFactory.keys()[idx] app.setStyle(style) + else: + app.setStyle('windowsvista') fc = App(qapp=app) diff --git a/appGUI/preferences/general/GeneralGUIPrefGroupUI.py b/appGUI/preferences/general/GeneralGUIPrefGroupUI.py index 50e47c20..82c3ead3 100644 --- a/appGUI/preferences/general/GeneralGUIPrefGroupUI.py +++ b/appGUI/preferences/general/GeneralGUIPrefGroupUI.py @@ -396,6 +396,9 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): qsettings = QSettings("Open Source", "FlatCAM") qsettings.setValue('style', str(style)) + new_style = QtWidgets.QStyleFactory.keys()[int(style)] + QtWidgets.QApplication.setStyle(new_style) + # This will write the setting to the platform specific storage. del qsettings