mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 22:00:28 +01:00
[apps/calculation] Correct error in resetting the scroll in pretty print
view Change-Id: I1a226cdf9d66e032d2cea143b779e11d996220a7
This commit is contained in:
@@ -30,7 +30,8 @@ KDSize PrettyPrintView::minimalSizeForOptimalDisplay() {
|
||||
}
|
||||
|
||||
void PrettyPrintView::reloadCell() {
|
||||
setContentOffset({0, 0});
|
||||
m_manualScrolling = 0;
|
||||
setContentOffset(KDPoint(m_manualScrolling, 0));
|
||||
}
|
||||
|
||||
bool PrettyPrintView::rightViewIsInvisible() {
|
||||
@@ -44,7 +45,7 @@ bool PrettyPrintView::handleEvent(Ion::Events::Event event) {
|
||||
KDCoordinate rightSpace = m_expressionView.bounds().width() - m_manualScrolling - bounds().width();
|
||||
KDCoordinate scrollAdd = rightSpace > 10 ? 10 : rightSpace;
|
||||
m_manualScrolling += scrollAdd;
|
||||
setContentOffset({m_manualScrolling, 0});
|
||||
setContentOffset(KDPoint(m_manualScrolling, 0));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -53,7 +54,7 @@ bool PrettyPrintView::handleEvent(Ion::Events::Event event) {
|
||||
KDCoordinate leftSpace = m_manualScrolling;
|
||||
KDCoordinate scrollSubstract = leftSpace > 10 ? 10 : leftSpace;
|
||||
m_manualScrolling -= scrollSubstract;
|
||||
setContentOffset({m_manualScrolling, 0});
|
||||
setContentOffset(KDPoint(m_manualScrolling, 0));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user