Themes: Fix UI recoloring for flat themes

Reduce the usage of half-transparent colors to just the Fancy* widgets.
Otherwise, we have side effects like QTCREATORBUG-15770 in other
widgets (e.g. search results pane).

Change-Id: I0e2b0155441c4f1a071bd3c1029577accb73d56b
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Alessandro Portale
2016-02-26 12:30:14 +01:00
parent c9f595bfc7
commit d36716ae14
2 changed files with 7 additions and 8 deletions

View File

@@ -300,8 +300,7 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const
if (selected) {
if (creatorTheme()->widgetStyle() == Theme::StyleFlat) {
// background color of a fancy tab that is active
painter->fillRect(rect.adjusted(0, 0, 0, -1),
creatorTheme()->color(Theme::BackgroundColorSelected));
painter->fillRect(rect, creatorTheme()->color(Theme::FancyToolButtonSelectedColor));
} else {
paintSelectedTabBackground(painter, rect);
}
@@ -324,7 +323,7 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const
painter->save();
painter->setOpacity(fader);
if (creatorTheme()->widgetStyle() == Theme::StyleFlat)
painter->fillRect(rect, creatorTheme()->color(Theme::BackgroundColorHover));
painter->fillRect(rect, creatorTheme()->color(Theme::FancyToolButtonHoverColor));
else
FancyToolButton::hoverOverlay(painter, rect);
painter->restore();