mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/calculation] Reinitiate the scrolling when reloading the pretty
print view Change-Id: I1975e46cc63109d47223018ca0e09bdc40274573
This commit is contained in:
@@ -54,6 +54,7 @@ void HistoryViewCell::reloadCell() {
|
||||
m_result.setBackgroundColor(Palette::CellBackgroundColor);
|
||||
m_prettyPrint.setBackgroundColor(backgroundColor);
|
||||
}
|
||||
m_prettyPrint.reloadCell();
|
||||
TableViewCell::reloadCell();
|
||||
layoutSubviews();
|
||||
}
|
||||
|
||||
@@ -34,6 +34,10 @@ KDSize PrettyPrintView::minimalSizeForOptimalDisplay() {
|
||||
return m_expressionView.minimalSizeForOptimalDisplay();
|
||||
}
|
||||
|
||||
void PrettyPrintView::reloadCell() {
|
||||
setContentOffset({0, 0});
|
||||
}
|
||||
|
||||
bool PrettyPrintView::handleEvent(Ion::Events::Event event) {
|
||||
switch (event) {
|
||||
case Ion::Events::Event::RIGHT_ARROW:
|
||||
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
void setBackgroundColor(KDColor backgroundColor);
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
KDSize minimalSizeForOptimalDisplay() override;
|
||||
void reloadCell();
|
||||
private:
|
||||
ExpressionView m_expressionView;
|
||||
KDCoordinate m_manualScrolling;
|
||||
|
||||
Reference in New Issue
Block a user