aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2024-03-15 14:31:29 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-03-26 21:26:56 +0000
commitefdc7318de2613fa873c87161d984e4f08b03804 (patch)
tree540849b9e964f874547191e4eb7537dc758e0df4
parent1586ea1f15b78aa1319447b8a6a41b23c19eb2e0 (diff)
Document Rectangle's border.pixelAligned property
For unknown reasons this property has been undocumented. Task-number: QTBUG-123210 Task-number: QTBUG-108831 Pick-to: 6.5 Change-Id: I1eba7385ee13943f9c1c3435583b570a18dff71e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 3b6c8d305a91609713278c694a5d2297a880956e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d8d6153ebea853bd021388757333bf112c3e7bd6)
-rw-r--r--src/quick/items/qquickrectangle.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquickrectangle.cpp b/src/quick/items/qquickrectangle.cpp
index dc6eb8d7f2..e757ec6cbd 100644
--- a/src/quick/items/qquickrectangle.cpp
+++ b/src/quick/items/qquickrectangle.cpp
@@ -339,6 +339,7 @@ void QQuickRectangle::doUpdate()
\qmlpropertygroup QtQuick::Rectangle::border
\qmlproperty int QtQuick::Rectangle::border.width
\qmlproperty color QtQuick::Rectangle::border.color
+ \qmlproperty bool QtQuick::Rectangle::border.pixelAligned
The width and color used to draw the border of the rectangle.
@@ -348,6 +349,10 @@ void QQuickRectangle::doUpdate()
rectangle itself or its position relative to other items if anchors are used.
The border is rendered within the rectangle's boundaries.
+
+ If \c pixelAligned is \c true (the default), the rendered border width is rounded to a whole
+ number of pixels, after device pixel ratio scaling. Setting \c pixelAligned to \c false will
+ allow fractional border widths, which may be desirable when \c antialiasing is enabled.
*/
QQuickPen *QQuickRectangle::border()
{