[escher] Correct text field

Change-Id: I3f7c7b26a2ff51366cfc241bc50f90fa5c050a72
This commit is contained in:
Émilie Feral
2017-02-28 15:02:02 +01:00
committed by Romain Goyet
parent a911bafa9c
commit 4a73a7ab0f
3 changed files with 15 additions and 5 deletions

View File

@@ -34,8 +34,8 @@ void ScrollableView::reloadScroll() {
void ScrollableView::layoutSubviews() {
KDSize viewSize = view()->minimalSizeForOptimalDisplay();
KDCoordinate viewWidth = viewSize.width() == 0 ? bounds().width() : viewSize.width();
KDCoordinate viewHeight = viewSize.height() == 0 ? bounds().height() : viewSize.height();
KDCoordinate viewWidth = viewSize.width() < bounds().width() ? bounds().width() : viewSize.width();
KDCoordinate viewHeight = viewSize.height() < bounds().height() ? bounds().height() : viewSize.height();
view()->setSize(KDSize(viewWidth, viewHeight));
ScrollView::layoutSubviews();
}