Smooth the separator handle dots by antialiasing them

This commit is contained in:
Kovid Goyal 2022-11-13 07:44:39 +05:30
parent e8f27b722c
commit 4cb02b4d4d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -287,6 +287,7 @@ void CalibreStyle::drawControl(ControlElement element, const QStyleOption *optio
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)); painter->setBrush(option->palette.color(QPalette::ColorGroup::Normal, QPalette::ColorRole::Shadow));
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;
const int handle_width = pixelMetric(PM_SplitterWidth, option, widget); const int handle_width = pixelMetric(PM_SplitterWidth, option, widget);