mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[escher] Implement ScrollView::minimalSizeForOptimalDisplay including margins
Remove from derived classes: - apps/calculation/scrollable_expression_view - apps/code/consol_line_cell - apps/shared/scrollable_exact_approximate_expressions_view - escher/layout_field - escher/table_view - escher/text_field
This commit is contained in:
committed by
EmilieNumworks
parent
0e0b49acce
commit
08e8bf0eeb
@@ -16,7 +16,7 @@ ParametersController::ContentView::ContentView(Responder * parentResponder, Sele
|
||||
}
|
||||
|
||||
void ParametersController::ContentView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
int tableHeight = m_selectableTableView->minimalSizeForOptimalDisplay().height()+ Metric::CommonTopMargin + Metric::CommonBottomMargin;
|
||||
int tableHeight = m_selectableTableView->minimalSizeForOptimalDisplay().height();
|
||||
ctx->fillRect(KDRect(0, tableHeight, bounds().width(), bounds().height() - tableHeight), Palette::WallScreen);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ View * ParametersController::ContentView::subviewAtIndex(int index) {
|
||||
void ParametersController::ContentView::layoutSubviews() {
|
||||
KDCoordinate titleHeight = KDFont::SmallFont->glyphSize().height()+k_titleMargin;
|
||||
m_titleView.setFrame(KDRect(0, 0, bounds().width(), titleHeight));
|
||||
KDCoordinate tableHeight = m_selectableTableView->minimalSizeForOptimalDisplay().height() + Metric::CommonTopMargin + Metric::CommonBottomMargin;
|
||||
KDCoordinate tableHeight = m_selectableTableView->minimalSizeForOptimalDisplay().height();
|
||||
m_selectableTableView->setFrame(KDRect(0, titleHeight, bounds().width(), tableHeight));
|
||||
KDCoordinate textHeight = KDFont::SmallFont->glyphSize().height();
|
||||
KDCoordinate defOrigin = (titleHeight+tableHeight)/2+(bounds().height()-textHeight)/2;
|
||||
|
||||
Reference in New Issue
Block a user