Files
Upsilon/apps/shared/new_function_cell.cpp
Émilie Feral 1f21251011 [escher] Change name: pointer->message
Change-Id: I0bd7a7d8da047b03342bec1ff31f29ad7efcc2f6
2017-03-16 15:12:12 +01:00

31 lines
612 B
C++

#include "new_function_cell.h"
#include "assert.h"
namespace Shared {
NewFunctionCell::NewFunctionCell(I18n::Message text) :
EvenOddCell(),
m_messageTextView(MessageTextView(KDText::FontSize::Large, text, 0.5f, 0.5f))
{
}
void NewFunctionCell::reloadCell() {
EvenOddCell::reloadCell();
m_messageTextView.setBackgroundColor(backgroundColor());
}
int NewFunctionCell::numberOfSubviews() const {
return 1;
}
View * NewFunctionCell::subviewAtIndex(int index) {
assert(index == 0);
return &m_messageTextView;
}
void NewFunctionCell::layoutSubviews() {
m_messageTextView.setFrame(bounds());
}
}