MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / drawSelectionRect

Function drawSelectionRect

launcher/ui/instanceview/InstanceDelegate.cpp:77–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77void drawSelectionRect(QPainter *painter, const QStyleOptionViewItem &option,
78 const QRect &rect)
79{
80 if ((option.state & QStyle::State_Selected))
81 painter->fillRect(rect, option.palette.brush(QPalette::Highlight));
82 else
83 {
84 QColor backgroundColor = option.palette.color(QPalette::Window);
85 backgroundColor.setAlpha(160);
86 painter->fillRect(rect, QBrush(backgroundColor));
87 }
88}
89
90void drawFocusRect(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect)
91{

Callers 1

paintMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected