Commit bd15f2b3 authored by Jens Bache-Wiig's avatar Jens Bache-Wiig
Browse files

Fixes: Set alternate base on light themes

Details:
Not all themes have ok contrast for alternate base and
we want to keep it light, so I'm enforcing it for
themes with white background.
parent 822d8810
......@@ -48,6 +48,7 @@
#include <QtGui/QVBoxLayout>
#include <QtGui/QToolButton>
#include <QtGui/QFocusEvent>
#include <QtGui/QPalette>
using namespace ProjectExplorer;
using namespace ProjectExplorer::Internal;
......@@ -74,6 +75,11 @@ public:
setUniformRowHeights(true);
setTextElideMode(Qt::ElideNone);
setAlternatingRowColors(true);
QPalette pal = palette();
if (pal.base().color() == Qt::white) { // Leave dark themes as they are
pal.setBrush(QPalette::AlternateBase, QColor(239, 239, 239));
setPalette(pal);
}
setProperty("AlternateEmpty", true); // Let Manhattan to override style default
// setExpandsOnDoubleClick(false);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment