Files
Upsilon/apps/calculation/scrollable_expression_view.cpp
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

34 lines
917 B
C++

#include "scrollable_expression_view.h"
#include <assert.h>
using namespace Poincare;
namespace Calculation {
ScrollableExpressionView::ScrollableExpressionView(Responder * parentResponder) :
ScrollableView(parentResponder, &m_expressionView, this),
m_expressionView()
{
setDecoratorType(ScrollView::Decorator::Type::Arrows);
setMargins(
Metric::CommonSmallMargin,
Metric::CommonLargeMargin,
Metric::CommonSmallMargin,
Metric::CommonLargeMargin
);
}
void ScrollableExpressionView::setLayout(Layout layout) {
m_expressionView.setLayout(layout);
}
void ScrollableExpressionView::setBackgroundColor(KDColor backgroundColor) {
m_expressionView.setBackgroundColor(backgroundColor);
ScrollableView::setBackgroundColor(backgroundColor);
}
void ScrollableExpressionView::setExpressionBackgroundColor(KDColor backgroundColor) {
m_expressionView.setBackgroundColor(backgroundColor);
}
}