Color Preferences: Disable colors rather than hide them (#10483)

This commit is contained in:
Daniel Ramöller 2016-11-06 08:45:09 +01:00 committed by Guillaume MM
parent 48ecf06d9b
commit 9bf8ac4432

View File

@ -1294,12 +1294,17 @@ void PrefColors::changeSysColor()
{
for (int row = 0 ; row < lyxObjectsLW->count() ; ++row) {
// skip colors that are taken from system palette
bool const hide = syscolorsCB->isChecked()
bool const disable = syscolorsCB->isChecked()
&& guiApp->colorCache().isSystem(lcolors_[row]);
lyxObjectsLW->item(row)->setHidden(hide);
}
QListWidgetItem * const item = lyxObjectsLW->item(row);
Qt::ItemFlags const flags = item->flags();
if (disable)
item->setFlags(flags & ~Qt::ItemIsEnabled);
else
item->setFlags(flags | Qt::ItemIsEnabled);
}
}
void PrefColors::changeLyxObjectsSelection()