mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[escher/view] setFrame and layoutSubviews can be forced
This commit is contained in:
@@ -24,7 +24,7 @@ KDCoordinate BannerView::minimalHeightForOptimalDisplayGivenWidth(KDCoordinate w
|
||||
return HeightGivenNumberOfLines(numberOfLinesGivenWidth(width));
|
||||
}
|
||||
|
||||
void BannerView::layoutSubviews() {
|
||||
void BannerView::layoutSubviews(bool force) {
|
||||
if (m_frame.isEmpty()) {
|
||||
/* If the frame has not been set yet, there is no point in layouting the
|
||||
* subviews.
|
||||
@@ -52,7 +52,7 @@ void BannerView::layoutSubviews() {
|
||||
subviewPreviousLine = subviewAtIndex(j);
|
||||
KDCoordinate width = subviewPreviousLine->minimalSizeForOptimalDisplay().width() + remainingWidth/nbOfSubviewsOnLine + (j == i-1) * roundingError;
|
||||
KDCoordinate height = subviewPreviousLine->minimalSizeForOptimalDisplay().height();
|
||||
subviewPreviousLine->setFrame(KDRect(x, y, width, height));
|
||||
subviewPreviousLine->setFrame(KDRect(x, y, width, height), force);
|
||||
x += width;
|
||||
}
|
||||
// Next line
|
||||
|
||||
Reference in New Issue
Block a user