From 5ab8440e2f121bb159c562b1149b5da58eed54e8 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 16 Mar 2016 17:09:22 +0100 Subject: ProgressBar: Add a theme color for the background The progress bar is important and custom enough to deserve its own theme color for the background. This change adds "ProgressBarBackgroundColor" and also sets it for dark.cretatortheme, so that it has a good contrast to ProgressBarColorNormal. Change-Id: I37731d7a918a862a28940e215c913f9ade8569ca Reviewed-by: Orgad Shaneh --- share/qtcreator/themes/dark.creatortheme | 1 + share/qtcreator/themes/darkframe.creatortheme | 1 + share/qtcreator/themes/default.creatortheme | 1 + src/libs/utils/theme/theme.h | 1 + src/plugins/coreplugin/progressmanager/progressbar.cpp | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/themes/dark.creatortheme b/share/qtcreator/themes/dark.creatortheme index ea9777c944..761b0e4439 100644 --- a/share/qtcreator/themes/dark.creatortheme +++ b/share/qtcreator/themes/dark.creatortheme @@ -92,6 +92,7 @@ ProgressBarColorError=error ProgressBarColorFinished=ff5aaa3c ProgressBarColorNormal=ff808080 ProgressBarTitleColor=text +ProgressBarBackgroundColor=normalBackground SplitterColor=ff313131 TextColorDisabled=textDisabled TextColorError=ffff4040 diff --git a/share/qtcreator/themes/darkframe.creatortheme b/share/qtcreator/themes/darkframe.creatortheme index 7b8e6067e5..7ba032d41f 100644 --- a/share/qtcreator/themes/darkframe.creatortheme +++ b/share/qtcreator/themes/darkframe.creatortheme @@ -94,6 +94,7 @@ ProgressBarColorError=ffdb6f71 ProgressBarColorFinished=dda4d576 ProgressBarColorNormal=ff999999 ProgressBarTitleColor=toolBarItem +ProgressBarBackgroundColor=a0606060 SplitterColor=splitter TextColorDisabled=textDisabled TextColorError=ffff4040 diff --git a/share/qtcreator/themes/default.creatortheme b/share/qtcreator/themes/default.creatortheme index d373839cbb..04bb840388 100644 --- a/share/qtcreator/themes/default.creatortheme +++ b/share/qtcreator/themes/default.creatortheme @@ -86,6 +86,7 @@ ProgressBarColorError=d2ff3c00 ProgressBarColorFinished=ff5aaa3c ProgressBarColorNormal=b4ffffff ProgressBarTitleColor=ffffffff +ProgressBarBackgroundColor=18ffffff SplitterColor=ff151515 TextColorDisabled=ff000000 TextColorError=ffff0000 diff --git a/src/libs/utils/theme/theme.h b/src/libs/utils/theme/theme.h index d674e0d1a5..9c2b92c620 100644 --- a/src/libs/utils/theme/theme.h +++ b/src/libs/utils/theme/theme.h @@ -112,6 +112,7 @@ public: ProgressBarColorFinished, ProgressBarColorNormal, ProgressBarTitleColor, + ProgressBarBackgroundColor, SplitterColor, TextColorDisabled, TextColorError, diff --git a/src/plugins/coreplugin/progressmanager/progressbar.cpp b/src/plugins/coreplugin/progressmanager/progressbar.cpp index 97c98bc495..f683b44a60 100644 --- a/src/plugins/coreplugin/progressmanager/progressbar.cpp +++ b/src/plugins/coreplugin/progressmanager/progressbar.cpp @@ -300,7 +300,7 @@ void ProgressBar::paintEvent(QPaintEvent *) //draw the progress bar if (creatorTheme()->widgetStyle() == Theme::StyleFlat) { p.fillRect(rect.adjusted(2, 2, -2, -2), - creatorTheme()->color(Theme::FancyToolButtonHoverColor)); + creatorTheme()->color(Theme::ProgressBarBackgroundColor)); p.fillRect(inner, c); } else { const static QImage bar(StyleHelper::dpiSpecificImageFile( -- cgit v1.2.1