fix(ui): clean up theme selector and migration for single-theme setup
Some checks failed
Build and Test / build (pull_request) Failing after 2m30s
Some checks failed
Build and Test / build (pull_request) Failing after 2m30s
- Remove dead code in migrateOldTheme() that set Theme parameter for KindredCreate.yaml, which no longer exists in the Stylesheets build - Remove orphaned Classic.yaml and KindredCreate.yaml parameter files from Stylesheets CMakeLists and from disk - Remove unused includes in ThemeSelectorWidget.cpp (QApplication, QEvent, Gui/Application.h)
This commit is contained in:
@@ -341,17 +341,6 @@ void StartupPostProcess::migrateOldTheme(const std::string& style)
|
|||||||
if (style == "FreeCAD Light.qss" || style == "FreeCAD Dark.qss") {
|
if (style == "FreeCAD Light.qss" || style == "FreeCAD Dark.qss") {
|
||||||
prefPackManager->apply("KindredCreate");
|
prefPackManager->apply("KindredCreate");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure the Theme parameter is set for KindredCreate so the style
|
|
||||||
// parameter YAML file (parameters/KindredCreate.yaml) is found.
|
|
||||||
if (style == "KindredCreate.qss") {
|
|
||||||
auto hGrp = App::GetApplication().GetParameterGroupByPath(
|
|
||||||
"User parameter:BaseApp/Preferences/MainWindow"
|
|
||||||
);
|
|
||||||
if (hGrp->GetASCII("Theme", "Classic") == "Classic") {
|
|
||||||
hGrp->SetASCII("Theme", "KindredCreate");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartupPostProcess::checkOpenGL()
|
void StartupPostProcess::checkOpenGL()
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ SET(Stylesheets_Files
|
|||||||
)
|
)
|
||||||
|
|
||||||
SET(Parameters_Files
|
SET(Parameters_Files
|
||||||
"parameters/Classic.yaml"
|
|
||||||
"parameters/KindredCreate.yaml"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(Overlay_Stylesheets_Files
|
SET(Overlay_Stylesheets_Files
|
||||||
|
|||||||
@@ -1,85 +0,0 @@
|
|||||||
# KindredCreate theme parameters - Catppuccin Mocha palette
|
|
||||||
# Used by FreeCAD.qss and overlay stylesheets for token substitution
|
|
||||||
|
|
||||||
# Primary surfaces
|
|
||||||
PrimaryColor: "#1e1e2e"
|
|
||||||
PrimaryColorDarken2: "#181825"
|
|
||||||
DialogBackgroundColor: "#1e1e2e"
|
|
||||||
GeneralBackgroundColor: "#1e1e2e"
|
|
||||||
GeneralAlternateBackgroundColor: "#181825"
|
|
||||||
|
|
||||||
# Text
|
|
||||||
TextForegroundColor: "#cdd6f4"
|
|
||||||
TextDisabledColor: "#6c7086"
|
|
||||||
TextUrlColor: "#89b4fa"
|
|
||||||
TextSelectBackgroundColor: "#585b70"
|
|
||||||
|
|
||||||
# Input fields
|
|
||||||
TextEditFieldBackgroundColor: "#313244"
|
|
||||||
InputFieldBorderRadius: "2px"
|
|
||||||
|
|
||||||
# Borders
|
|
||||||
GeneralBorderColor: "#45475a"
|
|
||||||
GeneralBorderHoverColor: "#585b70"
|
|
||||||
|
|
||||||
# Buttons
|
|
||||||
ButtonTopBackgroundColor: "#313244"
|
|
||||||
ButtonBottomBackgroundColor: "#313244"
|
|
||||||
ButtonBorderColor: "#45475a"
|
|
||||||
DefaultButtonTopBackgroundColor: "#cba6f7"
|
|
||||||
DefaultButtonBottomBackgroundColor: "#cba6f7"
|
|
||||||
DefaultButtonBorderColor: "#cba6f7"
|
|
||||||
CheckedButtonTopBackgroundColor: "#45475a"
|
|
||||||
CheckedButtonBottomBackgroundColor: "#45475a"
|
|
||||||
|
|
||||||
# Accent
|
|
||||||
AccentColor: "#cba6f7"
|
|
||||||
AccentBackgroundColor: "#45475a"
|
|
||||||
AccentHoverColor: "#b4befe"
|
|
||||||
|
|
||||||
# Interactive states
|
|
||||||
GeneralBackgroundHoverColor: "#313244"
|
|
||||||
GeneralDisabledBackgroundColor: "#181825"
|
|
||||||
GeneralHeaderBackgroundColor: "#313244"
|
|
||||||
|
|
||||||
# Grid
|
|
||||||
GeneralGridLinesColor: "#313244"
|
|
||||||
3DViewBackgroundRefColor: "#181825"
|
|
||||||
|
|
||||||
# Groupbox
|
|
||||||
GroupboxBackgroundColor: "#1e1e2e"
|
|
||||||
GroupboxBorderColor: "#45475a"
|
|
||||||
|
|
||||||
# Menu
|
|
||||||
MenuBackgroundColor: "#181825"
|
|
||||||
|
|
||||||
# Scrollbar
|
|
||||||
ScrollbarBackgroundColor: "#181825"
|
|
||||||
|
|
||||||
# Tabs
|
|
||||||
TabbarBackgroundColor: "#181825"
|
|
||||||
ActiveTabBackgroundColor: "#1e1e2e"
|
|
||||||
InActiveTabBackgroundColor: "#313244"
|
|
||||||
|
|
||||||
# Checkbox and radio
|
|
||||||
CheckBoxBackgroundColor: "#313244"
|
|
||||||
CheckBoxBorderColor: "#585b70"
|
|
||||||
RadioButtonBackgroundColor: "#313244"
|
|
||||||
RadioButtonBorderColor: "#585b70"
|
|
||||||
|
|
||||||
# Toolbar
|
|
||||||
ToolbarButtonsPadding: "4px"
|
|
||||||
|
|
||||||
# Icons
|
|
||||||
IconsLocationFolderName: "images_classic"
|
|
||||||
StylesheetIconsColor: "white"
|
|
||||||
|
|
||||||
# Sketcher constraint colors
|
|
||||||
SketcherFullyConstrainedColor: "#a6e3a1"
|
|
||||||
SketcherUnderConstrainedColor: "#f9e2af"
|
|
||||||
SketcherConflictingConstraintsColor: "#f38ba8"
|
|
||||||
SketcherRedundantConstraintsColor: "#fab387"
|
|
||||||
SketcherMalformedConstraintsColor: "#f38ba8"
|
|
||||||
SketcherPartiallyRedundantConstraintsColor: "#fab387"
|
|
||||||
SketcherSolverFailedColor: "#f38ba8"
|
|
||||||
SketcherEmptySketchColor: "#6c7086"
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
# KindredCreate theme parameters - Catppuccin Mocha palette
|
|
||||||
# Used by FreeCAD.qss and overlay stylesheets for token substitution
|
|
||||||
|
|
||||||
# Primary surfaces
|
|
||||||
PrimaryColor: "#1e1e2e"
|
|
||||||
PrimaryColorDarken2: "#181825"
|
|
||||||
DialogBackgroundColor: "#1e1e2e"
|
|
||||||
GeneralBackgroundColor: "#1e1e2e"
|
|
||||||
GeneralAlternateBackgroundColor: "#181825"
|
|
||||||
|
|
||||||
# Text
|
|
||||||
TextForegroundColor: "#cdd6f4"
|
|
||||||
TextDisabledColor: "#6c7086"
|
|
||||||
TextUrlColor: "#89b4fa"
|
|
||||||
TextSelectBackgroundColor: "#585b70"
|
|
||||||
|
|
||||||
# Input fields
|
|
||||||
TextEditFieldBackgroundColor: "#313244"
|
|
||||||
InputFieldBorderRadius: "2px"
|
|
||||||
|
|
||||||
# Borders
|
|
||||||
GeneralBorderColor: "#45475a"
|
|
||||||
GeneralBorderHoverColor: "#585b70"
|
|
||||||
|
|
||||||
# Buttons
|
|
||||||
ButtonTopBackgroundColor: "#313244"
|
|
||||||
ButtonBottomBackgroundColor: "#313244"
|
|
||||||
ButtonBorderColor: "#45475a"
|
|
||||||
DefaultButtonTopBackgroundColor: "#cba6f7"
|
|
||||||
DefaultButtonBottomBackgroundColor: "#cba6f7"
|
|
||||||
DefaultButtonBorderColor: "#cba6f7"
|
|
||||||
CheckedButtonTopBackgroundColor: "#45475a"
|
|
||||||
CheckedButtonBottomBackgroundColor: "#45475a"
|
|
||||||
|
|
||||||
# Accent
|
|
||||||
AccentColor: "#cba6f7"
|
|
||||||
AccentBackgroundColor: "#45475a"
|
|
||||||
AccentHoverColor: "#b4befe"
|
|
||||||
|
|
||||||
# Interactive states
|
|
||||||
GeneralBackgroundHoverColor: "#313244"
|
|
||||||
GeneralDisabledBackgroundColor: "#181825"
|
|
||||||
GeneralHeaderBackgroundColor: "#313244"
|
|
||||||
|
|
||||||
# Grid
|
|
||||||
GeneralGridLinesColor: "#313244"
|
|
||||||
3DViewBackgroundRefColor: "#181825"
|
|
||||||
|
|
||||||
# Groupbox
|
|
||||||
GroupboxBackgroundColor: "#1e1e2e"
|
|
||||||
GroupboxBorderColor: "#45475a"
|
|
||||||
|
|
||||||
# Menu
|
|
||||||
MenuBackgroundColor: "#181825"
|
|
||||||
|
|
||||||
# Scrollbar
|
|
||||||
ScrollbarBackgroundColor: "#181825"
|
|
||||||
|
|
||||||
# Tabs
|
|
||||||
TabbarBackgroundColor: "#181825"
|
|
||||||
ActiveTabBackgroundColor: "#1e1e2e"
|
|
||||||
InActiveTabBackgroundColor: "#313244"
|
|
||||||
|
|
||||||
# Checkbox and radio
|
|
||||||
CheckBoxBackgroundColor: "#313244"
|
|
||||||
CheckBoxBorderColor: "#585b70"
|
|
||||||
RadioButtonBackgroundColor: "#313244"
|
|
||||||
RadioButtonBorderColor: "#585b70"
|
|
||||||
|
|
||||||
# Toolbar
|
|
||||||
ToolbarButtonsPadding: "4px"
|
|
||||||
|
|
||||||
# Icons
|
|
||||||
IconsLocationFolderName: "images_classic"
|
|
||||||
StylesheetIconsColor: "white"
|
|
||||||
|
|
||||||
# Sketcher constraint colors
|
|
||||||
SketcherFullyConstrainedColor: "#a6e3a1"
|
|
||||||
SketcherUnderConstrainedColor: "#f9e2af"
|
|
||||||
SketcherConflictingConstraintsColor: "#f38ba8"
|
|
||||||
SketcherRedundantConstraintsColor: "#fab387"
|
|
||||||
SketcherMalformedConstraintsColor: "#f38ba8"
|
|
||||||
SketcherPartiallyRedundantConstraintsColor: "#fab387"
|
|
||||||
SketcherSolverFailedColor: "#f38ba8"
|
|
||||||
SketcherEmptySketchColor: "#6c7086"
|
|
||||||
@@ -21,8 +21,6 @@
|
|||||||
* *
|
* *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QEvent>
|
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
@@ -30,7 +28,6 @@
|
|||||||
|
|
||||||
#include "ThemeSelectorWidget.h"
|
#include "ThemeSelectorWidget.h"
|
||||||
#include <gsl/pointers>
|
#include <gsl/pointers>
|
||||||
#include <Gui/Application.h>
|
|
||||||
#include <Gui/PreferencePackManager.h>
|
#include <Gui/PreferencePackManager.h>
|
||||||
|
|
||||||
using namespace StartGui;
|
using namespace StartGui;
|
||||||
|
|||||||
Reference in New Issue
Block a user