From 33ab8fa2e88c2de3f1fb1816d39f5526f6d8f276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Br=C3=A6strup=20Sayoc?= Date: Wed, 4 Sep 2024 15:31:20 +0200 Subject: [PATCH 1/3] [Gui] QtStyle preference consistency Previously, the some of the code searched for the QtStyle in the wrong location --- src/Gui/PreferencePacks/FreeCAD Classic/post.FCMacro | 2 +- src/Gui/PreferencePacks/FreeCAD Dark/FreeCAD Dark.cfg | 4 +--- src/Gui/PreferencePacks/FreeCAD Light/FreeCAD Light.cfg | 4 +--- src/Gui/StartupProcess.cpp | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Gui/PreferencePacks/FreeCAD Classic/post.FCMacro b/src/Gui/PreferencePacks/FreeCAD Classic/post.FCMacro index b74390d66d..f0a0625bc9 100644 --- a/src/Gui/PreferencePacks/FreeCAD Classic/post.FCMacro +++ b/src/Gui/PreferencePacks/FreeCAD Classic/post.FCMacro @@ -4,5 +4,5 @@ import FreeCAD editorPrefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Editor") editorPrefs.RemInt("Text") -appPrefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/General") +appPrefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/MainWindow") appPrefs.RemString("QtStyle") diff --git a/src/Gui/PreferencePacks/FreeCAD Dark/FreeCAD Dark.cfg b/src/Gui/PreferencePacks/FreeCAD Dark/FreeCAD Dark.cfg index 16cf08d9fe..edf3c6b5b5 100644 --- a/src/Gui/PreferencePacks/FreeCAD Dark/FreeCAD Dark.cfg +++ b/src/Gui/PreferencePacks/FreeCAD Dark/FreeCAD Dark.cfg @@ -4,9 +4,6 @@ - - Fusion - @@ -179,6 +176,7 @@ + Fusion FreeCAD Dark FreeCAD Dark.qss diff --git a/src/Gui/PreferencePacks/FreeCAD Light/FreeCAD Light.cfg b/src/Gui/PreferencePacks/FreeCAD Light/FreeCAD Light.cfg index 3ce2e8bae1..220fb5352c 100644 --- a/src/Gui/PreferencePacks/FreeCAD Light/FreeCAD Light.cfg +++ b/src/Gui/PreferencePacks/FreeCAD Light/FreeCAD Light.cfg @@ -3,9 +3,6 @@ - - Fusion - @@ -209,6 +206,7 @@ + Fusion FreeCAD Light FreeCAD Light.qss Light Theme + Light Background.qss diff --git a/src/Gui/StartupProcess.cpp b/src/Gui/StartupProcess.cpp index 6f91024fce..7b7e131410 100644 --- a/src/Gui/StartupProcess.cpp +++ b/src/Gui/StartupProcess.cpp @@ -304,7 +304,7 @@ void StartupPostProcess::setCursorFlashing() void StartupPostProcess::setQtStyle() { - ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("General"); + ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("MainWindow"); auto qtStyle = hGrp->GetASCII("QtStyle"); QApplication::setStyle(QString::fromStdString(qtStyle)); } From f366227933a816dd001d9992969ab59895ec41f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Br=C3=A6strup=20Sayoc?= Date: Wed, 4 Sep 2024 15:32:08 +0200 Subject: [PATCH 2/3] [Gui] Add style, theme and QtStyle to clipboard about info Fixes #16272 --- src/Gui/Splashscreen.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Gui/Splashscreen.cpp b/src/Gui/Splashscreen.cpp index 8cc9ad04e2..28ebd96d39 100644 --- a/src/Gui/Splashscreen.cpp +++ b/src/Gui/Splashscreen.cpp @@ -881,6 +881,15 @@ void AboutDialog::copyToClipboard() } str << "\n"; + std::string styleSheet = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/MainWindow")->GetASCII("StyleSheet"); + std::string theme = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/MainWindow")->GetASCII("Theme"); + std::string style = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/MainWindow")->GetASCII("QtStyle"); + + str << "Stylesheet/Theme/QtStyle: " + << QString::fromStdString(styleSheet) << "/" + << QString::fromStdString(theme) << "/" + << QString::fromStdString(style) << "\n"; + // Add installed module information: auto modDir = fs::path(App::Application::getUserAppDataDir()) / "Mod"; bool firstMod = true; From 77a9bc9c36ad3f90f003f33e50c28763e74694c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Br=C3=A6strup=20Sayoc?= Date: Wed, 4 Sep 2024 15:34:46 +0200 Subject: [PATCH 3/3] Add myself to contributors --- src/Doc/CONTRIBUTORS | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Doc/CONTRIBUTORS b/src/Doc/CONTRIBUTORS index cf5d1997c1..d70a151643 100644 --- a/src/Doc/CONTRIBUTORS +++ b/src/Doc/CONTRIBUTORS @@ -18,6 +18,7 @@ Bartlomiej Niemiec Bas Ruigrok (Rexbas) bejant Benjamin Alterauge +Benjamin Bræstrup Sayoc Bernd Hahnebach bgbsww blobfish (tanderson69)