[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

@@ -67,10 +67,10 @@ View * CalculationCell::subviewAtIndex(int index) {
return &m_calculation;
}
void CalculationCell::layoutSubviews() {
void CalculationCell::layoutSubviews(bool force) {
KDSize textSize = m_text.minimalSizeForOptimalDisplay();
m_text.setFrame(KDRect(k_margin, 0, textSize.width(), bounds().height()));
m_calculation.setFrame(KDRect(2*k_margin+textSize.width()+ResponderImageCell::k_outline, ResponderImageCell::k_outline, calculationCellWidth(), ImageCell::k_height));
m_text.setFrame(KDRect(k_margin, 0, textSize.width(), bounds().height()), force);
m_calculation.setFrame(KDRect(2*k_margin+textSize.width()+ResponderImageCell::k_outline, ResponderImageCell::k_outline, calculationCellWidth(), ImageCell::k_height), force);
}
KDCoordinate CalculationCell::calculationCellWidth() const {