mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-03 03:46:58 +03:00
Added background cat. Proof of concept :3
This commit is contained in:
parent
7e222c3e8f
commit
d67d58e662
4 changed files with 28 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue