mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
4cb02b4d4d
commit
87ca4d6fe2
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user