mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[escher] In editable text menu list cell, layout subviews is handled by
parent class Change-Id: Ic1260b423fa8df6aff2771200238b39b06a989c6
This commit is contained in:
@@ -10,7 +10,6 @@ public:
|
||||
EditableTextMenuListCell(Responder * parentResponder, TextFieldDelegate * textFieldDelegate, char * draftTextBuffer, char * label = nullptr);
|
||||
View * accessoryView() const override;
|
||||
const char * editedText() const;
|
||||
void layoutSubviews() override;
|
||||
void didBecomeFirstResponder() override;
|
||||
void setEditing(bool isEditing);
|
||||
void reloadCell() override;
|
||||
|
||||
@@ -16,15 +16,6 @@ const char * EditableTextMenuListCell::editedText() const {
|
||||
return m_textField.text();
|
||||
}
|
||||
|
||||
void EditableTextMenuListCell::layoutSubviews() {
|
||||
MenuListCell::layoutSubviews();
|
||||
KDCoordinate width = bounds().width();
|
||||
KDCoordinate height = bounds().height();
|
||||
KDSize charSize = KDText::stringSize(" ");
|
||||
KDCoordinate textWidth = k_maxNumberOfEditableCharacters*charSize.width();
|
||||
m_textField.setFrame(KDRect(width - textWidth - k_separatorThickness, (height - charSize.height())/2, textWidth - k_separatorThickness, charSize.height()));
|
||||
}
|
||||
|
||||
void EditableTextMenuListCell::didBecomeFirstResponder() {
|
||||
app()->setFirstResponder(&m_textField);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user