mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 17:50:04 +01:00
[escher] create a class float table view cell
Change-Id: Ie0d0e701d60ccdd492760bcdc5857470fcd1a255
This commit is contained in:
26
escher/src/float_table_view_cell.cpp
Normal file
26
escher/src/float_table_view_cell.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <escher/float_table_view_cell.h>
|
||||
|
||||
FloatTableViewCell::FloatTableViewCell(char * label) :
|
||||
TableViewCell(label),
|
||||
m_contentView(FloatView())
|
||||
{
|
||||
}
|
||||
|
||||
void FloatTableViewCell::setFloat(float f) {
|
||||
m_contentView.setFloat(f);
|
||||
}
|
||||
|
||||
char * FloatTableViewCell::stringFromFloat() {
|
||||
return m_contentView.buffer();
|
||||
}
|
||||
|
||||
|
||||
View * FloatTableViewCell::contentView() const {
|
||||
return (View *)&m_contentView;
|
||||
}
|
||||
|
||||
void FloatTableViewCell::setHighlighted(bool highlight) {
|
||||
TableViewCell::setHighlighted(highlight);
|
||||
KDColor backgroundColor = highlight? Palette::FocusCellBackgroundColor : Palette::CellBackgroundColor;
|
||||
m_contentView.setBackgroundColor(backgroundColor);
|
||||
}
|
||||
Reference in New Issue
Block a user