Gui: Add ThemeTokenManager class to contain theme parameters
This class aims to implement Design Token idea into FreeCAD themes. It allows themes to use generic variables with generic values so we could use one qss theme and change the style based on values from preference packs.
This commit is contained in:
@@ -133,6 +133,8 @@ public:
|
||||
if (activeStyleSheet.isEmpty()) {
|
||||
activeStyleSheet = _default;
|
||||
}
|
||||
|
||||
activeStyleSheet = Application::Instance->replaceVariablesInQss(activeStyleSheet);
|
||||
}
|
||||
|
||||
ParameterGrp::handle handle;
|
||||
@@ -157,7 +159,7 @@ private:
|
||||
}
|
||||
else if (!overlayStyleSheet.isEmpty() && !QFile::exists(overlayStyleSheet)) {
|
||||
// User did choose one of predefined stylesheets, we need to qualify it with namespace
|
||||
overlayStyleSheet = QStringLiteral("overlay:%1").arg(overlayStyleSheet);
|
||||
overlayStyleSheet = QStringLiteral("overlay:%1").arg(overlayStyleSheet);
|
||||
}
|
||||
|
||||
return overlayStyleSheet;
|
||||
|
||||
Reference in New Issue
Block a user