mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 14:50:44 +01:00
[escher] add a minimal size to textfield
Change-Id: I6d1c4d0e687bc66aeadd4913ea4b3a94d7c26b75
This commit is contained in:
@@ -17,6 +17,7 @@ public:
|
||||
const char * textBuffer() const;
|
||||
int bufferLength() const;
|
||||
void setTextBuffer(const char * text);
|
||||
KDSize minimalSizeForOptimalDisplay() override;
|
||||
protected:
|
||||
#if ESCHER_VIEW_LOGGING
|
||||
const char * className() const override;
|
||||
|
||||
@@ -72,3 +72,8 @@ void TextField::setTextBuffer(const char * text) {
|
||||
m_currentTextLength = strlen(text);
|
||||
markRectAsDirty(bounds());
|
||||
}
|
||||
|
||||
KDSize TextField::minimalSizeForOptimalDisplay() {
|
||||
KDSize textSize = KDText::stringSize(m_textBuffer);
|
||||
return KDSize(0, textSize.height());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user