Skip to content
Snippets Groups Projects
Commit 6527fd1d authored by Lasse Holmstedt's avatar Lasse Holmstedt
Browse files

Fixed disabled checkbox styles for plugin manager

Reviewed-by: jbache
parent 53bdae3f
No related branches found
No related tags found
No related merge requests found
......@@ -221,16 +221,13 @@ int PluginView::parsePluginSpecs(QTreeWidgetItem *parentItem, Qt::CheckState &gr
++loadCount;
}
if (!m_whitelist.contains(spec->name()))
if (!m_whitelist.contains(spec->name())) {
pluginItem->setData(C_LOAD, Qt::CheckStateRole, state);
else {
QColor disabledColor = palette().color(QPalette::Disabled,QPalette::WindowText).lighter(120);
} else {
pluginItem->setData(C_LOAD, Qt::CheckStateRole, Qt::Checked);
pluginItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
pluginItem->setSizeHint(C_LOAD, QSize(1,1));
pluginItem->setForeground(C_LOAD, QBrush(disabledColor)); // QBrush(Qt::white, Qt::NoBrush));
//pluginItem->setBackground(C_LOAD, QBrush(Qt::white, Qt::NoBrush));
pluginItem->setFlags(Qt::ItemIsSelectable);
}
pluginItem->setToolTip(C_LOAD, tr("Load on Startup"));
m_specToItem.insert(spec, pluginItem);
......@@ -333,7 +330,7 @@ void PluginView::updatePluginSettings(QTreeWidgetItem *item, int column)
child->setData(C_LOAD, Qt::CheckStateRole, state);
} else {
child->setData(C_LOAD, Qt::CheckStateRole, Qt::Checked);
child->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
child->setFlags(Qt::ItemIsSelectable);
}
}
updatePluginDependencies();
......@@ -347,6 +344,9 @@ void PluginView::updatePluginDependencies()
{
foreach (PluginSpec *spec, PluginManager::instance()->loadQueue()) {
bool disableIndirectly = false;
if (m_whitelist.contains(spec->name()))
continue;
foreach(const PluginSpec *depSpec, spec->dependencySpecs()) {
if (!depSpec->isEnabled() || depSpec->isDisabledIndirectly()) {
disableIndirectly = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment