From 1dbb132f8974314e18ed10f1d916a6c2fe8bff22 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 28 Feb 2018 23:51:40 +0100 Subject: Material: round ripple translation to avoid artifacts 3b36c4e4 rounded translation of the ripple background node. Do the same for the ripple wave node. Task-number: QTBUG-58646 Change-Id: I455249603e5845a8790dcb374564744de4b880e2 Reviewed-by: Mitch Curtis --- src/imports/controls/material/qquickmaterialripple.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imports/controls/material/qquickmaterialripple.cpp b/src/imports/controls/material/qquickmaterialripple.cpp index 615d131b..1c3b3f12 100644 --- a/src/imports/controls/material/qquickmaterialripple.cpp +++ b/src/imports/controls/material/qquickmaterialripple.cpp @@ -112,8 +112,8 @@ void QQuickMaterialRippleWaveNode::updateCurrentTime(int time) const qreal dy = (1.0 - p) * (m_anchor.y() - m_bounds.height() / 2); QMatrix4x4 m; - m.translate((m_bounds.width() - m_value) / 2 + dx, - (m_bounds.height() - m_value) / 2 + dy); + m.translate(qRound((m_bounds.width() - m_value) / 2 + dx), + qRound((m_bounds.height() - m_value) / 2 + dy)); setMatrix(m); QSGOpacityNode *opacityNode = static_cast(firstChild()); -- cgit v1.2.3