mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-22 07:10:40 +01:00
25 lines
791 B
C++
25 lines
791 B
C++
#include <escher/message_table_cell_with_expression.h>
|
|
#include <escher/palette.h>
|
|
|
|
MessageTableCellWithExpression::MessageTableCellWithExpression(I18n::Message message, KDText::FontSize size) :
|
|
MessageTableCell(message, size),
|
|
m_subtitleView(1.0f, 0.5f, Palette::GreyDark)
|
|
{
|
|
}
|
|
|
|
View * MessageTableCellWithExpression::accessoryView() const {
|
|
return (View *)&m_subtitleView;
|
|
}
|
|
|
|
void MessageTableCellWithExpression::setHighlighted(bool highlight) {
|
|
MessageTableCell::setHighlighted(highlight);
|
|
KDColor backgroundColor = isHighlighted()? Palette::Select : KDColorWhite;
|
|
m_subtitleView.setBackgroundColor(backgroundColor);
|
|
}
|
|
|
|
void MessageTableCellWithExpression::setLayoutRef(Poincare::LayoutRef layout) {
|
|
m_subtitleView.setLayoutRef(layout);
|
|
reloadCell();
|
|
layoutSubviews();
|
|
}
|