Files
Upsilon/apps/shared/scrollable_exact_approximate_expressions_cell.h
Ruben Dashyan 0943406263 Fix HistoryViewCell and ScrollableExactApproximateExxpressionsCell margins issue
Remove all margins from those cells.
Rather add margins to their respective subviews:
 - ScrollableExpressionView
 - ScrollableExactApproximateExpressionsView.

As a notable consequence, the distance in HistoryViewCell between its
subviews becomes 10 instead of 5.

In passing, replace
 - Metric::HistoryHorizontalMargin = 10
 - ScrollableExactApproximateExpressionsView::k_digitHorizontalMargin = 10
 - HistoryViewCell::k_digitVerticalMargin = 5
 - ScrollableExactApproximateExpressionsCell::k_margin = 5
by
 - Metric::CommonSmallMargin = 5
 - Metric::CommonLargeMargin = 10.
2019-02-18 16:49:58 +01:00

37 lines
1.2 KiB
C++

#ifndef SHARED_SCROLLABLE_EXACT_APPROXIMATE_EXPRESSIONS_CELL_H
#define SHARED_SCROLLABLE_EXACT_APPROXIMATE_EXPRESSIONS_CELL_H
#include <escher.h>
#include "scrollable_exact_approximate_expressions_view.h"
namespace Shared {
class ScrollableExactApproximateExpressionsCell : public ::EvenOddCell, public Responder {
public:
ScrollableExactApproximateExpressionsCell(Responder * parentResponder = nullptr);
void setLayouts(Poincare::Layout approximateLayout, Poincare::Layout exactLayout) {
return m_view.setLayouts(approximateLayout, exactLayout);
}
void setEqualMessage(I18n::Message equalSignMessage) {
return m_view.setEqualMessage(equalSignMessage);
}
void setHighlighted(bool highlight) override;
void setEven(bool even) override;
void reloadCell() override;
void reloadScroll();
Responder * responder() override {
return this;
}
Poincare::Layout layout() const override { return m_view.layout(); }
void didBecomeFirstResponder() override;
private:
int numberOfSubviews() const override;
View * subviewAtIndex(int index) override;
void layoutSubviews() override;
ScrollableExactApproximateExpressionsView m_view;
};
}
#endif