[apps/calculation] Fit the layout of result view to the size of the

float text

Change-Id: Iad6b2021a23c491b166e518bba625dcf69c3757a
This commit is contained in:
Émilie Feral
2016-10-27 15:34:42 +02:00
parent 410ac08bc8
commit e22834216d

View File

@@ -43,7 +43,8 @@ void HistoryViewCell::layoutSubviews() {
} else {
m_prettyPrint.setFrame(KDRect(k_digitHorizontalMargin, k_digitVerticalMargin, prettyPrintSize.width(), prettyPrintSize.height()));
}
KDRect resultFrame(width - k_resultWidth - k_digitHorizontalMargin, prettyPrintSize.height() + 2*k_digitVerticalMargin, k_resultWidth, height - prettyPrintSize.height() - 2*k_digitVerticalMargin);
KDSize resultSize = m_result.minimalSizeForOptimalDisplay();
KDRect resultFrame(width - resultSize.width() - k_digitHorizontalMargin, prettyPrintSize.height() + 2*k_digitVerticalMargin, resultSize.width(), height - prettyPrintSize.height() - 2*k_digitVerticalMargin);
m_result.setFrame(resultFrame);
}