From 80d50d2a79973b77ac238e33e09bd58f66047abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Mon, 30 Apr 2018 18:04:33 +0200 Subject: [PATCH] [escher] Fix horizontal scroll in ELField Change-Id: Id2502f84514a1aeb76c84f7648dea110b0676ee4 --- escher/src/expression_layout_field.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escher/src/expression_layout_field.cpp b/escher/src/expression_layout_field.cpp index ed6573fb3..f67558707 100644 --- a/escher/src/expression_layout_field.cpp +++ b/escher/src/expression_layout_field.cpp @@ -36,7 +36,7 @@ void ExpressionLayoutField::scrollToCursor() { KDCoordinate underBaseline = m_contentView.cursorRect().height() - cursorBaseline; KDCoordinate minAroundBaseline = min(cursorBaseline, underBaseline); minAroundBaseline = min(minAroundBaseline, bounds().height() / 2); - KDRect balancedRect(0, m_contentView.cursorRect().y() + cursorBaseline - minAroundBaseline, Poincare::ExpressionLayoutCursor::k_cursorWidth, 2 * minAroundBaseline); + KDRect balancedRect(m_contentView.cursorRect().x(), m_contentView.cursorRect().y() + cursorBaseline - minAroundBaseline, Poincare::ExpressionLayoutCursor::k_cursorWidth, 2 * minAroundBaseline); scrollToContentRect(balancedRect, true); }