forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user