diff options
Diffstat (limited to 'src/quick/items/qquickrectangle.cpp')
-rw-r--r-- | src/quick/items/qquickrectangle.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/quick/items/qquickrectangle.cpp b/src/quick/items/qquickrectangle.cpp index 48f79a2192..ee1b66f2b5 100644 --- a/src/quick/items/qquickrectangle.cpp +++ b/src/quick/items/qquickrectangle.cpp @@ -321,6 +321,16 @@ void QQuickRectangle::doUpdate() } /*! + \qmlproperty bool QtQuick::Rectangle::antialiasing + + Used to decide if the Rectangle should use antialiasing or not. + \l {Antialiasing} provides information on the performance implications + of this property. + + The default is true for Rectangles with a radius, and false otherwise. +*/ + +/*! \qmlpropertygroup QtQuick::Rectangle::border \qmlproperty int QtQuick::Rectangle::border.width \qmlproperty color QtQuick::Rectangle::border.color @@ -409,6 +419,8 @@ void QQuickRectangle::setRadius(qreal radius) return; d->radius = radius; + d->setImplicitAntialiasing(radius != 0.0); + update(); emit radiusChanged(); } @@ -476,7 +488,7 @@ QSGNode *QQuickRectangle::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData } rectangle->setRadius(d->radius); - rectangle->setAntialiasing(d->antialiasing || d->radius > 0); + rectangle->setAntialiasing(antialiasing()); QGradientStops stops; if (d->gradient) { |