forked from qt-creator/qt-creator
Examples: Adapt line color between title and tags to category hr color
"Welcome_ForegroundSecondaryColor" is less likely to burn a permanent, straight line into user's retina. Change-Id: Ie6c6f02d8b53c340b322945f0d735177f22ddd56 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -446,6 +446,7 @@ ListItemDelegate::ListItemDelegate()
|
||||
: backgroundPrimaryColor(themeColor(Theme::Welcome_BackgroundPrimaryColor))
|
||||
, backgroundSecondaryColor(themeColor(Theme::Welcome_BackgroundSecondaryColor))
|
||||
, foregroundPrimaryColor(themeColor(Theme::Welcome_ForegroundPrimaryColor))
|
||||
, foregroundSecondaryColor(themeColor(Theme::Welcome_ForegroundSecondaryColor))
|
||||
, hoverColor(themeColor(Theme::Welcome_HoverColor))
|
||||
, textColor(themeColor(Theme::Welcome_TextColor))
|
||||
{
|
||||
@@ -567,7 +568,7 @@ void ListItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
||||
// The separator line below the example title.
|
||||
const int ll = nameRect.height() + 3;
|
||||
const QLine line = QLine(0, ll, textArea.width(), ll).translated(shiftedTextRect.topLeft());
|
||||
painter->setPen(foregroundPrimaryColor);
|
||||
painter->setPen(foregroundSecondaryColor);
|
||||
painter->setOpacity(animationProgress); // "fade in" separator line and description
|
||||
painter->drawLine(line);
|
||||
|
||||
@@ -586,7 +587,7 @@ void ListItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
||||
}
|
||||
|
||||
// Separator line between text and 'Tags:' section
|
||||
painter->setPen(foregroundPrimaryColor);
|
||||
painter->setPen(foregroundSecondaryColor);
|
||||
painter->drawLine(QLineF(textArea.topLeft(), textArea.topRight())
|
||||
.translated(0, TagsSeparatorY));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user