[escher] Avoid using floats to compute ints.

Change-Id: I5637194badc75eec6f016f44bb9660b51d2157b9
This commit is contained in:
Léa Saviot
2018-04-19 16:42:03 +02:00
parent b90dea7cee
commit 56b2b505cd
3 changed files with 3 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ KDSize ExpressionView::minimalSizeForOptimalDisplay() const {
KDPoint ExpressionView::drawingOrigin() const {
KDSize expressionSize = m_expressionLayout->size();
return KDPoint(m_horizontalAlignment*(m_frame.width() - expressionSize.width()), 0.5f*(m_frame.height() - expressionSize.height()));
return KDPoint(m_horizontalAlignment*(m_frame.width() - expressionSize.width()), (m_frame.height() - expressionSize.height())/2);
}
KDPoint ExpressionView::absoluteDrawingOrigin() const {