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

31 lines
595 B
C++

#include "new_function_cell.h"
#include "assert.h"
namespace Shared {
NewFunctionCell::NewFunctionCell(I18n::Message text) :
EvenOddCell(),
m_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());
}
}