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:
@@ -46,25 +46,25 @@ Base::Reference<ParameterGrp> Preferences::getPreferenceGroup(const char* Name)
|
||||
->GetGroup(Name);
|
||||
}
|
||||
|
||||
App::Color Preferences::defaultLineColor()
|
||||
Base::Color Preferences::defaultLineColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(
|
||||
getPreferenceGroup("Appearance")->GetUnsigned("DefaultLineColor", 0x3CF00000));
|
||||
return fcColor;
|
||||
}
|
||||
|
||||
App::Color Preferences::defaultTextColor()
|
||||
Base::Color Preferences::defaultTextColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(
|
||||
getPreferenceGroup("Appearance")->GetUnsigned("DefaultTextColor", 0x00000000));
|
||||
return fcColor;
|
||||
}
|
||||
|
||||
App::Color Preferences::defaultTextBackgroundColor()
|
||||
Base::Color Preferences::defaultTextBackgroundColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(
|
||||
getPreferenceGroup("Appearance")->GetUnsigned("DefaultTextBackgroundColor", 0x3CF00000));
|
||||
return fcColor;
|
||||
|
||||
@@ -44,10 +44,10 @@ class MeasureExport Preferences
|
||||
public:
|
||||
static Base::Reference<ParameterGrp> getPreferenceGroup(const char* Name);
|
||||
|
||||
static App::Color defaultLineColor();
|
||||
static App::Color defaultTextColor();
|
||||
static Base::Color defaultLineColor();
|
||||
static Base::Color defaultTextColor();
|
||||
static int defaultFontSize();
|
||||
static App::Color defaultTextBackgroundColor();
|
||||
static Base::Color defaultTextBackgroundColor();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -237,16 +237,16 @@ void ViewProviderMeasureBase::finishRestoring()
|
||||
void ViewProviderMeasureBase::onChanged(const App::Property* prop)
|
||||
{
|
||||
if (prop == &TextColor) {
|
||||
const App::Color& color = TextColor.getValue();
|
||||
const Base::Color& color = TextColor.getValue();
|
||||
pLabel->textColor.setValue(color.r, color.g, color.b);
|
||||
updateIcon();
|
||||
}
|
||||
else if (prop == &TextBackgroundColor) {
|
||||
const App::Color& color = TextBackgroundColor.getValue();
|
||||
const Base::Color& color = TextBackgroundColor.getValue();
|
||||
pLabel->backgroundColor.setValue(color.r, color.g, color.b);
|
||||
}
|
||||
else if (prop == &LineColor) {
|
||||
const App::Color& color = LineColor.getValue();
|
||||
const Base::Color& color = LineColor.getValue();
|
||||
pColor->rgb.setValue(color.r, color.g, color.b);
|
||||
}
|
||||
else if (prop == &FontSize) {
|
||||
|
||||
Reference in New Issue
Block a user