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.
This commit is contained in:
Jens Bache-Wiig
2009-01-27 12:49:44 +01:00
parent 822d881019
commit bd15f2b308

View File

@@ -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);
}