aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickanchors_p.h
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2012-05-09 11:25:31 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-11 07:22:25 +0200
commit50482f69af0b9392424dfdad5376fcb09be36d46 (patch)
tree5d0cbc6f95d28d03c82e0bf0dc96b4755e7877ce /src/quick/items/qquickanchors_p.h
parent67fb05034c9758d25464f2103ae6068dbc9bb110 (diff)
Make unaligned centered alignment optional.
Centered alignment was recently made unaligned by e99c5a3f113bbc1b8f8db996b4b0d5715eea2d89. This has the side-effect of sometimes making items appear fuzzy due to sub-pixel alignment. Since we have two conflicting goals, make this behavior configuarable. Change-Id: I5ed0e9532a64f4a986d148044f5871a7ec970f5f Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'src/quick/items/qquickanchors_p.h')
-rw-r--r--src/quick/items/qquickanchors_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquickanchors_p.h b/src/quick/items/qquickanchors_p.h
index 9076fbe697..7167857104 100644
--- a/src/quick/items/qquickanchors_p.h
+++ b/src/quick/items/qquickanchors_p.h
@@ -77,6 +77,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickAnchors : public QObject
Q_PROPERTY(QQuickItem *fill READ fill WRITE setFill RESET resetFill NOTIFY fillChanged)
Q_PROPERTY(QQuickItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged)
Q_PROPERTY(bool mirrored READ mirrored NOTIFY mirroredChanged)
+ Q_PROPERTY(bool alignWhenCentered READ alignWhenCentered WRITE setAlignWhenCentered NOTIFY centerAlignedChanged)
public:
QQuickAnchors(QQuickItem *item, QObject *parent=0);
@@ -159,6 +160,9 @@ public:
bool mirrored();
+ bool alignWhenCentered() const;
+ void setAlignWhenCentered(bool);
+
void classBegin();
void componentComplete();
@@ -181,6 +185,7 @@ Q_SIGNALS:
void horizontalCenterOffsetChanged();
void baselineOffsetChanged();
void mirroredChanged();
+ void centerAlignedChanged();
private:
friend class QQuickItemPrivate;