diff options
Diffstat (limited to 'gui/instancedelegate.cpp')
-rw-r--r-- | gui/instancedelegate.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gui/instancedelegate.cpp b/gui/instancedelegate.cpp index dac2dacb..86b7d399 100644 --- a/gui/instancedelegate.cpp +++ b/gui/instancedelegate.cpp @@ -33,9 +33,15 @@ ListViewDelegate::ListViewDelegate ( QObject* parent ) : QStyledItemDelegate ( p void drawSelectionRect(QPainter *painter, const QStyleOptionViewItemV4 &option, const QRect &rect) { - if (!(option.state & QStyle::State_Selected)) - return; - painter->fillRect ( rect, option.palette.brush ( QPalette::Highlight ) ); + if ((option.state & QStyle::State_Selected)) + painter->fillRect ( rect, option.palette.brush ( QPalette::Highlight ) ); + else + { + QColor backgroundColor = option.palette.color(QPalette::Background); + backgroundColor.setAlpha(160); + painter->fillRect ( rect, QBrush(backgroundColor) ); + } + } void drawFocusRect(QPainter *painter, const QStyleOptionViewItemV4 &option, const QRect &rect) |