Commit a9a509d4 authored by Marco Martin's avatar Marco Martin
Browse files

ensure the rounded rectangle of scrollbard stays round

Summary:
with the new very slim scrollbars, the rounded rectangle could
go to have a radius more than half their width, making them look
"pointy", this ensures they stay properly round

Test Plan: slim scrollbars still round, bigger ones are unaltered

Reviewers: #plasma, #vdg, hpereiradacosta, hein

Reviewed By: #plasma, hein

Subscribers: hein, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10080
parent 1eccd00e
......@@ -1258,7 +1258,7 @@ namespace Breeze
painter->setRenderHint( QPainter::Antialiasing, true );
const QRectF baseRect( rect );
const qreal radius( 0.5*Metrics::ScrollBar_SliderWidth );
const qreal radius( 0.5 * std::min({baseRect.width(), baseRect.height(), (qreal)Metrics::ScrollBar_SliderWidth}) );
// content
if( color.isValid() )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment