summaryrefslogtreecommitdiffstats
path: root/gui/instancedelegate.cpp
diff options
context:
space:
mode:
authorOrochimarufan <orochimarufan.x3@gmail.com>2013-03-22 14:01:54 +0100
committerOrochimarufan <orochimarufan.x3@gmail.com>2013-03-22 14:01:54 +0100
commitcd1fdbbbc2953c5e34d8c0ae6861bec4a7f6532e (patch)
treea4148d6bb1704e635807c37b36013e9a33820a80 /gui/instancedelegate.cpp
parentf4c9cb8c1d395422b7e4f1c27ac92b6df08a39bb (diff)
parente4806ab08d0293d395c1718ab16d28ba2ae9d0ed (diff)
downloadMultiMC-cd1fdbbbc2953c5e34d8c0ae6861bec4a7f6532e.tar
MultiMC-cd1fdbbbc2953c5e34d8c0ae6861bec4a7f6532e.tar.gz
MultiMC-cd1fdbbbc2953c5e34d8c0ae6861bec4a7f6532e.tar.lz
MultiMC-cd1fdbbbc2953c5e34d8c0ae6861bec4a7f6532e.tar.xz
MultiMC-cd1fdbbbc2953c5e34d8c0ae6861bec4a7f6532e.zip
Merge branch 'master' of http://github.com/peterix/MultiMC5
Conflicts: CMakeLists.txt main.cpp
Diffstat (limited to 'gui/instancedelegate.cpp')
-rw-r--r--gui/instancedelegate.cpp12
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)