mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[escher] Re layout subviews of menu list view when changing the text of
the cell Change-Id: I9d21ffbc7967687f8701f0258501148b5b39fdc0
This commit is contained in:
@@ -63,8 +63,7 @@ int Probability::LawController::reusableCellCount() {
|
||||
|
||||
void Probability::LawController::willDisplayCellForIndex(TableViewCell * cell, int index) {
|
||||
MenuListCell * myCell = (MenuListCell *)cell;
|
||||
myCell->textView()->setText(m_messages[index]);
|
||||
myCell->textView()->setAlignment(0., 0.5);
|
||||
myCell->setText(m_messages[index]);
|
||||
}
|
||||
|
||||
KDCoordinate Probability::LawController::cellHeight() {
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
class MenuListCell : public TableViewCell {
|
||||
public:
|
||||
MenuListCell(char * label = nullptr);
|
||||
PointerTextView * textView();
|
||||
virtual View * contentView() const;
|
||||
void setText(const char * text);
|
||||
void drawRect(KDContext * ctx, KDRect rect) const override;
|
||||
void reloadCell() override;
|
||||
int numberOfSubviews() const override;
|
||||
|
||||
@@ -41,8 +41,9 @@ void MenuListCell::reloadCell() {
|
||||
m_pointerTextView.setBackgroundColor(backgroundColor);
|
||||
}
|
||||
|
||||
PointerTextView * MenuListCell::textView() {
|
||||
return &m_pointerTextView;
|
||||
void MenuListCell::setText(const char * text) {
|
||||
m_pointerTextView.setText(text);
|
||||
layoutSubviews();
|
||||
}
|
||||
|
||||
View * MenuListCell::contentView() const {
|
||||
|
||||
Reference in New Issue
Block a user