Welcome: Fix the hover background color

It used the wrong color token. With the correct one, the hover effect
is a bit less prominent.

Change-Id: I95a1f5a92f95d4055ae8bce703fdc633b122ac59
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2024-02-29 16:02:33 +01:00
committed by hjk
parent dfb685d64c
commit 4f30c2b4ed
4 changed files with 18 additions and 16 deletions

View File

@@ -329,10 +329,13 @@ public:
{
const bool selected = option.state & QStyle::State_Selected;
const bool hovered = option.state & QStyle::State_MouseOver;
const QColor fillColor = creatorTheme()->color(hovered ? Theme::Token_Foreground_Muted
: Theme::Token_Background_Muted);
const QColor strokeColor = creatorTheme()->color(selected ? Theme::Token_Stroke_Strong
: Theme::Token_Stroke_Subtle);
const QColor fillColor =
creatorTheme()->color(hovered ? WelcomePageHelpers::cardHoverBackground
: WelcomePageHelpers::cardDefaultBackground);
const QColor strokeColor =
creatorTheme()->color(selected ? Theme::Token_Stroke_Strong
: hovered ? WelcomePageHelpers::cardHoverStroke
: WelcomePageHelpers::cardDefaultStroke);
WelcomePageHelpers::drawCardBackground(painter, itemRect, fillColor, strokeColor);
}
{