Commit 57d01156 authored by Alessandro Portale's avatar Alessandro Portale

ProgressBar: Conditional highlight and HighDPI fix

This change makes drawing of the highlight above each progress bar
depend on the current Theme::DrawToolBarHighlights flag.

Also some off-by-ones issues in HighDPI are fixed.

Change-Id: I80bb21d001784a8622fff795f3751d7b1697ddf1
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@theqtcompany.com>
parent 3e1c7f6f
......@@ -244,11 +244,14 @@ void ProgressBar::paintEvent(QPaintEvent *)
// Draw separator
int separatorHeight = m_separatorVisible ? SEPARATOR_HEIGHT : 0;
if (m_separatorVisible) {
QRectF innerRect = QRectF(this->rect()).adjusted(0.5, 0.5, -0.5, -0.5);
p.setPen(StyleHelper::sidebarShadow());
p.drawLine(0,0, size().width(), 0);
p.drawLine(innerRect.topLeft(), innerRect.topRight());
p.setPen(StyleHelper::sidebarHighlight());
p.drawLine(1, 1, size().width(), 1);
if (creatorTheme()->flag(Theme::DrawToolBarHighlights)) {
p.setPen(StyleHelper::sidebarHighlight());
p.drawLine(innerRect.topLeft() + QPointF(1, 1), innerRect.topRight() + QPointF(0, 1));
}
}
if (m_titleVisible) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment