Base: Move App::Color to Base

Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
This commit is contained in:
Kacper Donat
2025-02-15 22:58:19 +01:00
parent 0ba52f0e22
commit 13fbab9e42
215 changed files with 1057 additions and 1054 deletions

View File

@@ -339,7 +339,7 @@ App::Material Material::getDefaultAppearance()
ParameterGrp::handle hGrp =
App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
auto getColor = [hGrp](const char* parameter, App::Color& color) {
auto getColor = [hGrp](const char* parameter, Base::Color& color) {
uint32_t packed = color.getPackedRGB();
packed = hGrp->GetUnsigned(parameter, packed);
color.setPackedRGB(packed);
@@ -363,10 +363,10 @@ App::Material Material::getDefaultAppearance()
float red = static_cast<float>(intRandom(0, 255)) / 255.0F;
float green = static_cast<float>(intRandom(0, 255)) / 255.0F;
float blue = static_cast<float>(intRandom(0, 255)) / 255.0F;
mat.diffuseColor = App::Color(red, green, blue);
mat.diffuseColor = Base::Color(red, green, blue);
}
else {
// Color = (204, 204, 230) = 3435980543UL
// Base::Color = (204, 204, 230) = 3435980543UL
getColor("DefaultShapeColor", mat.diffuseColor);
}