Files
Upsilon/escher/src/message_table_cell_with_expression.cpp
Hugo Saint-Vignes e27c668c40 [apps,escher,kandinsky,poincare,python] Replace every "grey" with "gray"
Change-Id: I60a232849dce90f70e6977b6024d6e9b1ce1b731
2020-11-04 15:07:20 +01:00

25 lines
820 B
C++

#include <escher/message_table_cell_with_expression.h>
#include <escher/palette.h>
MessageTableCellWithExpression::MessageTableCellWithExpression(I18n::Message message, const KDFont * font) :
MessageTableCell(message, font),
m_subtitleView(1.0f, 0.5f, Palette::SecondaryText)
{
}
View * MessageTableCellWithExpression::accessoryView() const {
return (View *)&m_subtitleView;
}
void MessageTableCellWithExpression::setHighlighted(bool highlight) {
MessageTableCell::setHighlighted(highlight);
KDColor backgroundColor = isHighlighted()? Palette::ListCellBackgroundSelected : Palette::ListCellBackground;
m_subtitleView.setBackgroundColor(backgroundColor);
}
void MessageTableCellWithExpression::setLayout(Poincare::Layout layout) {
m_subtitleView.setLayout(layout);
reloadCell();
layoutSubviews();
}