mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
vertically. We add an option to decide which subviews should overlap on top of the other if there is not enough space
24 lines
876 B
C++
24 lines
876 B
C++
#include <escher/expression_table_cell_with_expression.h>
|
|
#include <escher/palette.h>
|
|
#include <assert.h>
|
|
|
|
ExpressionTableCellWithExpression::ExpressionTableCellWithExpression(Responder * parentResponder) :
|
|
ExpressionTableCell(parentResponder, Layout::HorizontalLeftOverlap),
|
|
m_accessoryExpressionView(1.0f, 0.5f, Palette::GreyDark, KDColorWhite)
|
|
{}
|
|
|
|
View * ExpressionTableCellWithExpression::accessoryView() const {
|
|
return (View *)&m_accessoryExpressionView;
|
|
}
|
|
|
|
void ExpressionTableCellWithExpression::setHighlighted(bool highlight) {
|
|
ExpressionTableCell::setHighlighted(highlight);
|
|
KDColor backgroundColor = highlight? Palette::Select : KDColorWhite;
|
|
m_accessoryExpressionView.setBackgroundColor(backgroundColor);
|
|
}
|
|
|
|
void ExpressionTableCellWithExpression::setAccessoryLayout(Poincare::Layout l) {
|
|
m_accessoryExpressionView.setLayout(l);
|
|
layoutSubviews();
|
|
}
|