mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 05:37:11 +00:00
Color Preferences: Disable colors rather than hide them (#10483)
This commit is contained in:
parent
48ecf06d9b
commit
9bf8ac4432
@ -1294,12 +1294,17 @@ void PrefColors::changeSysColor()
|
|||||||
{
|
{
|
||||||
for (int row = 0 ; row < lyxObjectsLW->count() ; ++row) {
|
for (int row = 0 ; row < lyxObjectsLW->count() ; ++row) {
|
||||||
// skip colors that are taken from system palette
|
// skip colors that are taken from system palette
|
||||||
bool const hide = syscolorsCB->isChecked()
|
bool const disable = syscolorsCB->isChecked()
|
||||||
&& guiApp->colorCache().isSystem(lcolors_[row]);
|
&& 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()
|
void PrefColors::changeLyxObjectsSelection()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user