Files
Upsilon/escher/src/expression_table_cell.cpp
Émilie Feral d7091397e5 [escher] Rule of 5 in view
Change-Id: Iba04e9046845b544e184530562e34f831fce96f6
2017-05-24 15:32:22 +02:00

25 lines
733 B
C++

#include <escher/expression_table_cell.h>
#include <escher/palette.h>
#include <assert.h>
ExpressionTableCell::ExpressionTableCell(Layout layout) :
TableCell(layout),
m_labelExpressionView(0.0f, 0.5f, KDColorBlack, KDColorWhite)
{
}
View * ExpressionTableCell::labelView() const {
return (View *)&m_labelExpressionView;
}
void ExpressionTableCell::setHighlighted(bool highlight) {
TableCell::setHighlighted(highlight);
KDColor backgroundColor = highlight? Palette::Select : KDColorWhite;
m_labelExpressionView.setBackgroundColor(backgroundColor);
}
void ExpressionTableCell::setExpression(Poincare::ExpressionLayout * expressionLayout) {
m_labelExpressionView.setExpression(expressionLayout);
layoutSubviews();
}