[escher] Reorganize all cells'name and factorize their layouts

Change-Id: I69900ee98ff6a6868f96d70a0e335a589ef16c3f
This commit is contained in:
Émilie Feral
2017-02-17 10:56:21 +01:00
parent 4a1735c29e
commit 2e16365100
149 changed files with 903 additions and 914 deletions

View File

@@ -0,0 +1,32 @@
#include <escher/pointer_table_cell_with_buffer.h>
#include <escher/palette.h>
PointerTableCellWithBuffer::PointerTableCellWithBuffer(char * label) :
PointerTableCell(label),
m_accessoryView(BufferTextView(KDText::FontSize::Large, 1.0f, 0.5f))
{
}
void PointerTableCellWithBuffer::setAccessoryText(const char * textBody) {
m_accessoryView.setText(textBody);
reloadCell();
}
const char * PointerTableCellWithBuffer::accessoryText() {
return m_accessoryView.text();
}
View * PointerTableCellWithBuffer::accessoryView() const {
return (View *)&m_accessoryView;
}
void PointerTableCellWithBuffer::setHighlighted(bool highlight) {
PointerTableCell::setHighlighted(highlight);
KDColor backgroundColor = isHighlighted()? Palette::Select : KDColorWhite;
m_accessoryView.setBackgroundColor(backgroundColor);
}
void PointerTableCellWithBuffer::setTextColor(KDColor color) {
m_accessoryView.setTextColor(color);
PointerTableCell::setTextColor(color);
}