void QmlAnchorBindingProxy::setRightTarget(const QVariant &target) { QmlItemNode newTarget(target.value<ModelNode>()); if (newTarget == m_rightTarget) return; RewriterTransaction transaction = m_fxItemNode.modelNode().view()->beginRewriterTransaction(); m_rightTarget = newTarget; calcRightMargin(); emit rightTargetChanged(); }
void QmlAnchorBindingProxy::setRightAnchor(bool anchor) { if (!m_qmlItemNode.hasNodeParent()) return; if (rightAnchored() == anchor) return; RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setRightAnchor")); if (!anchor) { removeRightAnchor(); } else { calcRightMargin(); if (leftAnchored()) backupPropertyAndRemove(modelNode(), "width"); } emit rightAnchorChanged(); if (hasAnchors() != anchor) emit anchorsChanged(); }