Skip to content

Commit

Permalink
Make sure blur radius isn't too large
Browse files Browse the repository at this point in the history
  • Loading branch information
tsujan committed Feb 10, 2022
1 parent 076517d commit 8e79ca8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Kvantum/style/blur/blurhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ QRegion BlurHelper::blurRegion (QWidget* widget) const

if (radius > 0)
{
radius = qMin (radius, qMin (rect.width(), rect.height()) / 2);
QSize rSize (radius, radius);
QRegion topLeft (QRect (rect.topLeft(), 2 * rSize), QRegion::Ellipse);
QRegion topRight (QRect (rect.topLeft() + QPoint(rect.width() - 2 * radius, 0),
Expand Down

0 comments on commit 8e79ca8

Please sign in to comment.