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();
|
const auto highlightEnd = highlights.cend();
|
||||||
for (auto highlightIt = highlights.cbegin(); highlightIt != highlightEnd; ++highlightIt) {
|
for (auto highlightIt = highlights.cbegin(); highlightIt != highlightEnd; ++highlightIt) {
|
||||||
const QColor &color = creatorTheme()->color(highlightIt.key());
|
const QColor &color = creatorTheme()->color(highlightIt.key());
|
||||||
for (int i = 0, total = highlightIt.value().size(); i < total; ++i) {
|
for (const QRect &rect : highlightIt.value())
|
||||||
const QRect rect = highlightIt.value().at(i);
|
|
||||||
painter.fillRect(rect, color);
|
painter.fillRect(rect, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Highlight::Highlight(Id category_, int position_,
|
Highlight::Highlight(Id category_, int position_,
|
||||||
Theme::Color color_, Highlight::Priority priority_)
|
Theme::Color color_, Highlight::Priority priority_)
|
||||||
|
|||||||
Reference in New Issue
Block a user