Make progress details and toggle button more visually connected

By using the same background color.
If the progress details and the toggled button have different background
colors, it makes it visually more difficult to realize that they belong
together.

Task-number: QTCREATORBUG-28078
Change-Id: I7ce8c5702b10e10ea81b644d5ea4f7ebcfb8c223
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Eike Ziller
2022-08-31 11:42:24 +02:00
parent 3020a93709
commit 635d293ce2
2 changed files with 3 additions and 2 deletions

View File

@@ -303,6 +303,7 @@ void FutureProgress::paintEvent(QPaintEvent *)
QPainter p(this); QPainter p(this);
if (creatorTheme()->flag(Theme::FlatToolBars)) { if (creatorTheme()->flag(Theme::FlatToolBars)) {
p.fillRect(rect(), StyleHelper::baseColor()); p.fillRect(rect(), StyleHelper::baseColor());
p.fillRect(rect(), creatorTheme()->color(Theme::FancyToolButtonSelectedColor));
} else { } else {
QLinearGradient grad = StyleHelper::statusBarGradient(rect()); QLinearGradient grad = StyleHelper::statusBarGradient(rect());
p.fillRect(rect(), grad); p.fillRect(rect(), grad);

View File

@@ -230,7 +230,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
const int separatorHeight = m_separatorVisible ? SEPARATOR_HEIGHT : 0; const int separatorHeight = m_separatorVisible ? SEPARATOR_HEIGHT : 0;
if (m_separatorVisible) { if (m_separatorVisible) {
QRectF innerRect = QRectF(this->rect()).adjusted(0.5, 0.5, -0.5, -0.5); QRectF innerRect = QRectF(this->rect()).adjusted(0.5, 0.5, -0.5, -0.5);
p.setPen(StyleHelper::sidebarShadow()); p.setPen(StyleHelper::baseColor());
p.drawLine(innerRect.topLeft(), innerRect.topRight()); p.drawLine(innerRect.topLeft(), innerRect.topRight());
if (creatorTheme()->flag(Theme::DrawToolBarHighlights)) { if (creatorTheme()->flag(Theme::DrawToolBarHighlights)) {