[escher/view] setFrame and layoutSubviews can be forced

This commit is contained in:
Léa Saviot
2019-10-02 11:22:49 +02:00
parent f85658f5e6
commit 9f018eb9d9
168 changed files with 421 additions and 405 deletions

View File

@@ -46,12 +46,12 @@ View * CalculationController::ContentView::subviewAtIndex(int index) {
return &m_distributionCurveView;
}
void CalculationController::ContentView::layoutSubviews() {
void CalculationController::ContentView::layoutSubviews(bool force) {
KDCoordinate titleHeight = KDFont::SmallFont->glyphSize().height()+k_titleHeightMargin;
m_titleView.setFrame(KDRect(0, 0, bounds().width(), titleHeight));
m_titleView.setFrame(KDRect(0, 0, bounds().width(), titleHeight), force);
KDCoordinate calculationHeight = ResponderImageCell::k_oneCellHeight+2*k_tableMargin;
m_selectableTableView->setFrame(KDRect(0, titleHeight, bounds().width(), calculationHeight));
m_distributionCurveView.setFrame(KDRect(0, titleHeight+calculationHeight, bounds().width(), bounds().height() - calculationHeight - titleHeight));
m_selectableTableView->setFrame(KDRect(0, titleHeight, bounds().width(), calculationHeight), force);
m_distributionCurveView.setFrame(KDRect(0, titleHeight+calculationHeight, bounds().width(), bounds().height() - calculationHeight - titleHeight), force);
}
CalculationController::CalculationController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate, Distribution * distribution, Calculation * calculation) :