forked from qt-creator/qt-creator
Utils: Fix missing DetailsWidget outline
On some systems, QPalette::Midlight can have the same color as the background color. So instead of using QPalette::Midlight on non-macOS, mix our own color with 15% text color intensity, to visually match what Qt Creator < 9.0 did. Change-Id: I40848b5e16344c07f42c20415194f893641d5f70 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -227,11 +227,8 @@ void DetailsWidget::paintEvent(QPaintEvent *paintEvent)
|
||||
: palette().color(QPalette::Window);
|
||||
p.fillRect(rect(), bgColor);
|
||||
}
|
||||
if (!creatorTheme()->flag(Theme::FlatProjectsMode)) {
|
||||
const QColor outlineColor = palette().color(HostOsInfo::isMacHost() ? QPalette::Mid
|
||||
: QPalette::Midlight);
|
||||
qDrawPlainRect(&p, rect(), outlineColor);
|
||||
}
|
||||
if (!creatorTheme()->flag(Theme::FlatProjectsMode))
|
||||
qDrawPlainRect(&p, rect(), DetailsButton::outlineColor());
|
||||
}
|
||||
|
||||
void DetailsWidget::enterEvent(QEnterEvent *event)
|
||||
|
||||
Reference in New Issue
Block a user