[Start] Fix ThemeAccentColors not populated... (#15574)
* [Start] Fix ThemeAccentColors not populated... ...on some versions of Qt * [Start] Only apply if the ThemeAccentColor1 does not exist * [Start] Fix Lint feedback * [Start] Set constants * [Start] Fix new Lint feedback
This commit is contained in:
@@ -141,6 +141,16 @@ void ThemeSelectorWidget::themeChanged(Theme newTheme)
|
||||
prefPackManager->apply("FreeCAD Light");
|
||||
break;
|
||||
}
|
||||
ParameterGrp::handle hGrp =
|
||||
App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Themes");
|
||||
const unsigned long nonExistentColor = -1434171135;
|
||||
const unsigned long defaultAccentColor = 1434171135;
|
||||
unsigned long longAccentColor1 = hGrp->GetUnsigned("ThemeAccentColor1", nonExistentColor);
|
||||
if (longAccentColor1 == nonExistentColor) {
|
||||
hGrp->SetUnsigned("ThemeAccentColor1", defaultAccentColor);
|
||||
hGrp->SetUnsigned("ThemeAccentColor2", defaultAccentColor);
|
||||
hGrp->SetUnsigned("ThemeAccentColor3", defaultAccentColor);
|
||||
}
|
||||
}
|
||||
|
||||
bool ThemeSelectorWidget::eventFilter(QObject* object, QEvent* event)
|
||||
|
||||
Reference in New Issue
Block a user