aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-02-28 23:51:40 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2018-03-01 07:30:04 +0000
commit1dbb132f8974314e18ed10f1d916a6c2fe8bff22 (patch)
tree4b2e89339a965e2e3de1c6dc7a877b3941f42f31
parent70ad96e6207551ba0f40e4501e3d2d38ea325385 (diff)
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 <mitch.curtis@qt.io>
-rw-r--r--src/imports/controls/material/qquickmaterialripple.cpp4
1 files 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<QSGOpacityNode *>(firstChild());