[TechDraw] Simplify retrievement of user preferences
for all TechDraw files
This commit is contained in:
committed by
WandererFan
parent
50c2b7e9d8
commit
5d05acc87e
@@ -81,20 +81,16 @@ QColor PreferencesGui::preselectQColor()
|
||||
|
||||
App::Color PreferencesGui::sectionLineColor()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("SectionColor", 0x000000FF));
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Decorations")->GetUnsigned("SectionColor", 0x000000FF));
|
||||
return fcColor;
|
||||
}
|
||||
|
||||
QColor PreferencesGui::sectionLineQColor()
|
||||
{
|
||||
//if the App::Color version has already lightened the color, we don't want to do it again
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("SectionColor", 0x000000FF));
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Decorations")->GetUnsigned("SectionColor", 0x000000FF));
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user