summaryrefslogtreecommitdiffstats
path: root/gui/instancedelegate.cpp
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-03-28 11:37:12 -0500
committerAndrew <forkk@forkk.net>2013-03-28 11:37:12 -0500
commitebb2c54975e3f0b7b891532e8e72d2ef760f96c4 (patch)
tree973de7066457a1faddffd3834eb0c260d5191ec2 /gui/instancedelegate.cpp
parent168ed3e8e58a8e5065ffa720f8d45f4cee0f2069 (diff)
parent1f13f0c665001a1a79f00cdad1e63e6c9802e55f (diff)
downloadMultiMC-ebb2c54975e3f0b7b891532e8e72d2ef760f96c4.tar
MultiMC-ebb2c54975e3f0b7b891532e8e72d2ef760f96c4.tar.gz
MultiMC-ebb2c54975e3f0b7b891532e8e72d2ef760f96c4.tar.lz
MultiMC-ebb2c54975e3f0b7b891532e8e72d2ef760f96c4.tar.xz
MultiMC-ebb2c54975e3f0b7b891532e8e72d2ef760f96c4.zip
Merge branch 'master' of git://github.com/peterix/MultiMC5
Conflicts: CMakeLists.txt gui/mainwindow.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)