mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 01:29:58 +01:00
[escher/view] setFrame and layoutSubviews can be forced
This commit is contained in:
@@ -25,18 +25,18 @@ View * WarningController::ContentView::subviewAtIndex(int index) {
|
||||
return views[index];
|
||||
}
|
||||
|
||||
void WarningController::ContentView::layoutSubviews() {
|
||||
void WarningController::ContentView::layoutSubviews(bool force) {
|
||||
if (numberOfSubviews() == 1) {
|
||||
m_textView1.setFrame(bounds());
|
||||
m_textView1.setFrame(bounds(), force);
|
||||
m_textView1.setAlignment(k_middleAlignment, k_middleAlignment);
|
||||
return;
|
||||
}
|
||||
assert(numberOfSubviews() == 2);
|
||||
KDRect fullBounds = bounds();
|
||||
KDCoordinate halfHeight = fullBounds.height()/2;
|
||||
m_textView1.setFrame(KDRect(fullBounds.topLeft(), fullBounds.width(), halfHeight));
|
||||
m_textView1.setFrame(KDRect(fullBounds.topLeft(), fullBounds.width(), halfHeight), force);
|
||||
m_textView1.setAlignment(k_middleAlignment, k_shiftedAlignment);
|
||||
m_textView2.setFrame(KDRect(fullBounds.left(), fullBounds.top()+halfHeight, fullBounds.width(), halfHeight));
|
||||
m_textView2.setFrame(KDRect(fullBounds.left(), fullBounds.top()+halfHeight, fullBounds.width(), halfHeight), force);
|
||||
}
|
||||
|
||||
KDSize WarningController::ContentView::minimalSizeForOptimalDisplay() const {
|
||||
|
||||
Reference in New Issue
Block a user