MCPcopy Create free account
hub / github.com/MultiMC/Launcher / drawSelectionRect

Function drawSelectionRect

launcher/ui/instanceview/InstanceDelegate.cpp:57–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void drawSelectionRect(QPainter *painter, const QStyleOptionViewItem &option,
58 const QRect &rect)
59{
60 if ((option.state & QStyle::State_Selected))
61 painter->fillRect(rect, option.palette.brush(QPalette::Highlight));
62 else
63 {
64 QColor backgroundColor = option.palette.color(QPalette::Background);
65 backgroundColor.setAlpha(160);
66 painter->fillRect(rect, QBrush(backgroundColor));
67 }
68}
69
70void drawFocusRect(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect)
71{

Callers 1

paintMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected