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

@@ -116,7 +116,7 @@ ViewProviderAnnotation::~ViewProviderAnnotation()
void ViewProviderAnnotation::onChanged(const App::Property* prop)
{
if (prop == &TextColor) {
const App::Color& c = TextColor.getValue();
const Base::Color& c = TextColor.getValue();
pColor->rgb.setValue(c.r,c.g,c.b);
}
else if (prop == &Justification) {
@@ -315,7 +315,7 @@ ViewProviderAnnotationLabel::~ViewProviderAnnotationLabel()
void ViewProviderAnnotationLabel::onChanged(const App::Property* prop)
{
if (prop == &BackgroundColor) {
const App::Color& c = BackgroundColor.getValue();
const Base::Color& c = BackgroundColor.getValue();
pColor->rgb.setValue(c.r,c.g,c.b);
}
if (prop == &TextColor || prop == &BackgroundColor ||
@@ -454,10 +454,10 @@ void ViewProviderAnnotationLabel::drawImage(const std::vector<std::string>& s)
QFontMetrics fm(font);
int w = 0;
int h = fm.height() * s.size();
const App::Color& b = this->BackgroundColor.getValue();
const Base::Color& b = this->BackgroundColor.getValue();
QColor brush;
brush.setRgbF(b.r,b.g,b.b);
const App::Color& t = this->TextColor.getValue();
const Base::Color& t = this->TextColor.getValue();
QColor front;
front.setRgbF(t.r,t.g,t.b);