Active container (light gray) and edit (yellow) colors in Tree view are now changeable in prefs->display->colors
This commit is contained in:
@@ -977,8 +977,10 @@ DocumentItem::~DocumentItem()
|
||||
|
||||
void DocumentItem::slotInEdit(const Gui::ViewProviderDocumentObject& v)
|
||||
{
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/TreeView");
|
||||
unsigned long col = hGrp->GetUnsigned("TreeEditColor",4294902015);
|
||||
FOREACH_ITEM(item,v)
|
||||
item->setBackgroundColor(0,Qt::yellow);
|
||||
item->setBackgroundColor(0,QColor((col >> 24) & 0xff,(col >> 16) & 0xff,(col >> 8) & 0xff));
|
||||
END_FOREACH_ITEM
|
||||
}
|
||||
|
||||
@@ -1279,8 +1281,11 @@ void DocumentItem::slotHighlightObject (const Gui::ViewProviderDocumentObject& o
|
||||
item->setData(0, Qt::BackgroundColorRole,QVariant());
|
||||
break;
|
||||
case Gui::LightBlue:
|
||||
if (set)
|
||||
item->setBackgroundColor(0,QColor(230,230,255));
|
||||
if (set) {
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/TreeView");
|
||||
unsigned long col = hGrp->GetUnsigned("TreeActiveColor",3873898495);
|
||||
item->setBackgroundColor(0,QColor((col >> 24) & 0xff,(col >> 16) & 0xff,(col >> 8) & 0xff));
|
||||
}
|
||||
else
|
||||
item->setData(0, Qt::BackgroundColorRole,QVariant());
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user