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:
@@ -50,19 +50,19 @@ View * ParametersController::ContentView::subviewAtIndex(int index) {
|
||||
return &m_secondParameterDefinition;
|
||||
}
|
||||
|
||||
void ParametersController::ContentView::layoutSubviews() {
|
||||
void ParametersController::ContentView::layoutSubviews(bool force) {
|
||||
KDCoordinate titleHeight = KDFont::SmallFont->glyphSize().height()+k_titleMargin;
|
||||
m_titleView.setFrame(KDRect(0, 0, bounds().width(), titleHeight));
|
||||
m_titleView.setFrame(KDRect(0, 0, bounds().width(), titleHeight), force);
|
||||
KDCoordinate tableHeight = m_selectableTableView->minimalSizeForOptimalDisplay().height();
|
||||
m_selectableTableView->setFrame(KDRect(0, titleHeight, bounds().width(), tableHeight));
|
||||
m_selectableTableView->setFrame(KDRect(0, titleHeight, bounds().width(), tableHeight), force);
|
||||
KDCoordinate textHeight = KDFont::SmallFont->glyphSize().height();
|
||||
KDCoordinate defOrigin = (titleHeight+tableHeight)/2+(bounds().height()-textHeight)/2;
|
||||
m_secondParameterDefinition.setFrame(KDRectZero);
|
||||
m_secondParameterDefinition.setFrame(KDRectZero, force);
|
||||
if (m_numberOfParameters == 2) {
|
||||
defOrigin = (titleHeight+tableHeight)/2+(bounds().height()-2*textHeight-k_textMargin)/2;
|
||||
m_secondParameterDefinition.setFrame(KDRect(0, defOrigin+textHeight+k_textMargin, bounds().width(), textHeight));
|
||||
m_secondParameterDefinition.setFrame(KDRect(0, defOrigin+textHeight+k_textMargin, bounds().width(), textHeight), force);
|
||||
}
|
||||
m_firstParameterDefinition.setFrame(KDRect(0, defOrigin, bounds().width(), textHeight));
|
||||
m_firstParameterDefinition.setFrame(KDRect(0, defOrigin, bounds().width(), textHeight), force);
|
||||
}
|
||||
|
||||
/* Parameters Controller */
|
||||
|
||||
Reference in New Issue
Block a user