[apps/calculation] CanBeSingleLine differs if args are view/layout sizes

If the sizes are for layouts, we need to add the margins added by the
views.
This commit is contained in:
Léa Saviot
2020-05-19 16:42:28 +02:00
committed by EmilieNumworks
parent 4f50a72abf
commit 579485c8c0
7 changed files with 25 additions and 18 deletions

View File

@@ -125,7 +125,7 @@ Layout Calculation::createApproximateOutputLayout(Context * context, bool * coul
}
}
KDCoordinate Calculation::height(Context * context, KDCoordinate verticalMarginBetweenLayouts, KDCoordinate verticalMarginAroundLayouts, bool expanded, bool forceSingleLine, CanBeSingleLineFunction canBeSingleLine) {
KDCoordinate Calculation::height(Context * context, KDCoordinate verticalMarginBetweenLayouts, KDCoordinate verticalMarginAroundLayouts, bool expanded, bool forceSingleLine, LayoutsCanBeSingleLineFunction canBeSingleLine) {
KDCoordinate result = expanded ? m_expandedHeight : m_height;
if (result >= 0) {
// Height already computed