forked from qt-creator/qt-creator
HighlightScrollBar: Modernize overlay painting
Change-Id: I59da9b106204e27b202b08d0502052f3697c71a0 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -296,12 +296,10 @@ void HighlightScrollBarOverlay::paintEvent(QPaintEvent *paintEvent)
|
||||
const auto highlightEnd = highlights.cend();
|
||||
for (auto highlightIt = highlights.cbegin(); highlightIt != highlightEnd; ++highlightIt) {
|
||||
const QColor &color = creatorTheme()->color(highlightIt.key());
|
||||
for (int i = 0, total = highlightIt.value().size(); i < total; ++i) {
|
||||
const QRect rect = highlightIt.value().at(i);
|
||||
for (const QRect &rect : highlightIt.value())
|
||||
painter.fillRect(rect, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Highlight::Highlight(Id category_, int position_,
|
||||
Theme::Color color_, Highlight::Priority priority_)
|
||||
|
||||
Reference in New Issue
Block a user