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

Fixes: Use alternate row colors for sidebar

Task:     As discussed with b_lindeijer
Details:
This enables alternate row colors, with filled empty
area on the side bar for improved usability.
parent 2c8635ef
...@@ -388,15 +388,20 @@ QPixmap ManhattanStyle::standardPixmap(StandardPixmap standardPixmap, const QSty ...@@ -388,15 +388,20 @@ QPixmap ManhattanStyle::standardPixmap(StandardPixmap standardPixmap, const QSty
int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget,
QStyleHintReturn *returnData) const QStyleHintReturn *returnData) const
{ {
int ret = 0; int ret = d->style->styleHint(hint, option, widget, returnData);
switch (hint) { switch (hint) {
// Make project explorer alternate rows all the way
case QStyle::SH_ItemView_PaintAlternatingRowColorsForEmptyArea:
if (widget && widget->property("AlternateEmpty").toBool())
ret = true;
break;
case QStyle::SH_EtchDisabledText: case QStyle::SH_EtchDisabledText:
ret = false; // We really should only enforce this for panel widgets if (panelWidget(widget))
ret = false;
break; break;
default: default:
ret = d->style->styleHint(hint, option, widget, returnData); break;
} }
return ret; return ret;
} }
......
...@@ -73,6 +73,8 @@ public: ...@@ -73,6 +73,8 @@ public:
setContextMenuPolicy(Qt::CustomContextMenu); setContextMenuPolicy(Qt::CustomContextMenu);
setUniformRowHeights(true); setUniformRowHeights(true);
setTextElideMode(Qt::ElideNone); setTextElideMode(Qt::ElideNone);
setAlternatingRowColors(true);
setProperty("AlternateEmpty", true); // Let Manhattan to override style default
// setExpandsOnDoubleClick(false); // setExpandsOnDoubleClick(false);
} }
......
Markdown is supported
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