mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 19:49:58 +02:00
[escher] Reorganize all cells'name and factorize their layouts
Change-Id: I69900ee98ff6a6868f96d70a0e335a589ef16c3f
This commit is contained in:
32
escher/src/pointer_table_cell_with_buffer.cpp
Normal file
32
escher/src/pointer_table_cell_with_buffer.cpp
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user