mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 22:00:28 +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
@@ -19,7 +19,7 @@ bool ScrollableView::handleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
}
|
||||
if (event == Ion::Events::Right) {
|
||||
KDCoordinate movementToEdge = m_contentView->minimalSizeForOptimalDisplay().width() - bounds().width() - m_manualScrollingOffset.x();
|
||||
KDCoordinate movementToEdge = minimalSizeForOptimalDisplay().width() - bounds().width() - m_manualScrollingOffset.x();
|
||||
if (movementToEdge > 0) {
|
||||
translation = KDPoint(min(Metric::ScrollStep, movementToEdge), 0);
|
||||
}
|
||||
@@ -31,7 +31,7 @@ bool ScrollableView::handleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
}
|
||||
if (event == Ion::Events::Down) {
|
||||
KDCoordinate movementToEdge = m_contentView->minimalSizeForOptimalDisplay().height() - bounds().height() - m_manualScrollingOffset.y();
|
||||
KDCoordinate movementToEdge = minimalSizeForOptimalDisplay().height() - bounds().height() - m_manualScrollingOffset.y();
|
||||
if (movementToEdge > 0) {
|
||||
translation = KDPoint(0, min(Metric::ScrollStep, movementToEdge));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user