Dont rely on shadow color for separator dots as it seems to vary between systems

Instead use text color + alpha
This commit is contained in:
Kovid Goyal 2022-11-13 07:48:55 +05:30
parent 4cb02b4d4d
commit 87ca4d6fe2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -286,7 +286,9 @@ void CalibreStyle::drawControl(ControlElement element, const QStyleOption *optio
painter->setBrush(option->palette.color(QPalette::ColorGroup::Normal, QPalette::ColorRole::AlternateBase)); painter->setBrush(option->palette.color(QPalette::ColorGroup::Normal, QPalette::ColorRole::AlternateBase));
painter->drawRect(option->rect); painter->drawRect(option->rect);
// draw the dots // draw the dots
painter->setBrush(option->palette.color(QPalette::ColorGroup::Normal, QPalette::ColorRole::Shadow)); QColor dot_color = option->palette.color(QPalette::ColorGroup::Normal, QPalette::ColorRole::Text);
dot_color.setAlphaF(0.5);
painter->setBrush(dot_color);
painter->setRenderHint(QPainter::Antialiasing, true); painter->setRenderHint(QPainter::Antialiasing, true);
const bool horizontal = (option->state & QStyle::State_Horizontal) ? true : false; const bool horizontal = (option->state & QStyle::State_Horizontal) ? true : false;
static const int dot_count = 4; static const int dot_count = 4;