Commit Graph

12 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Markus Reitböck
a72a0d6405 Gui: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:03 +02:00
Kacper Donat
f3b5748643 Gui: Try to load Theme Parameters from file
This creates logic that tries to load user parameters from file as the
priority and pushes back older mechanism to lower layer. Older way of
loading theme parameters should be preserved until we release first 1.1
RC.
2025-08-25 00:47:55 +02:00
Kacper Donat
333a6c4585 Gui: Add YamlParameterSource for StyleParameters
This adds ability to read and write Style Parameters from YAML files.
This will allow to move certain tokens out of the User Parameter system
to ensure that they can be update without user needing to reapply the
theme.
2025-08-25 00:47:55 +02:00
Kacper Donat
da03225f3b Gui: Add ParameterDefinition to Style Parameters
This adds a way to define parameters within code, that allows developers
to easily encapsulate the parameters and their default values.
2025-08-12 22:04:23 +02:00
Kacper Donat
bf856a1076 Gui: Make StyleParameterManager::resolve return optional result
This changes the resolve method of style parameter manager to return
optional intead of definitive result. In reality tokens may not be
defioned correctly and optionals provide a good way to nicely handle
defaults.
2025-08-12 22:04:23 +02:00
Kacper Donat
8072dcac34 Gui: Rename StyleParameters::Length to StyleParameters::Numeric
This change gives a better name to the parameter type that is used to
store numeric values. Before it was called length, but it can store
other quantities as well so the name is no longer fitting.
2025-08-12 21:25:41 +02:00
Kacper Donat
7e97d7fe5e Gui: StyleParameters - use Base::Color instead of QColor
If possible we should prefer using our own classess instead of ones
coming from frameworks. This changes Style Parameters to use Base::Color
class instead of QColor. Calculations are still done using QColor but
the data is always exposed as Base::Color.
2025-08-12 21:25:41 +02:00
Syres916
49109fb3bd [Gui] add carriage return to warnings 2025-08-08 06:51:18 -05:00
Chris Hennes
b3bc81603d Gui: Fix compiler warnings 2025-07-20 22:47:52 +02:00
Kacper Donat
58349460e7 Gui: Add blend function to style parameters 2025-07-14 20:48:49 +02:00
Kacper Donat
8d3f41059f 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.
2025-07-07 00:07:31 +02:00