diff options
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r-- | src/quick/items/qquickitem.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index a38b8bd514..fd81328d29 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -2893,6 +2893,7 @@ void QQuickItemPrivate::transform_clear(QQmlListProperty<QQuickTransform> *prop) \qmlproperty real QtQuick2::Item::anchors.baselineOffset \qmlproperty bool QtQuick2::Item::anchors.mirrored + \qmlproperty bool QtQuick2::Item::anchors.alignWhenCentered Anchors provide a way to position an item by specifying its relationship with other items. @@ -2953,6 +2954,13 @@ void QQuickItemPrivate::transform_clear(QQmlListProperty<QQuickTransform> *prop) \c anchors.mirrored returns true it the layout has been \l {LayoutMirroring}{mirrored}. + \c anchors.alignWhenCentered (default true) forces centered anchors to align to a + whole pixel, i.e. if the item being centered has an odd width/height the item + will be positioned on a whole pixel rather than being placed on a half-pixel. + This ensures the item is painted crisply. There are cases where this is not + desirable, for example when rotating the item jitters may be apparent as the + center is rounded. + \note You can only anchor an item to siblings or a parent. For more information see \l {anchor-layout}{Anchor Layouts}. |