Textbox height fixed when only accepting single line

This commit is contained in:
Yousef Khadadeh 2025-11-02 09:38:15 +03:00
parent 86e0999a5c
commit 640d4673ad
5 changed files with 15 additions and 10 deletions

View file

@ -21,7 +21,7 @@ template <typename T> class TextBox : public Element {
CLAY({
.layout = {
.sizing = {.width = CLAY_SIZING_GROW(static_cast<float>(io.fontSize * 2)), .height = CLAY_SIZING_GROW(static_cast<float>(io.fontSize * 1.25f))}
.sizing = {.width = CLAY_SIZING_GROW(static_cast<float>(io.fontSize * 2)), .height = singleLine ? CLAY_SIZING_FIXED(static_cast<float>(io.fontSize * 1.25f)) : CLAY_SIZING_GROW(static_cast<float>(io.fontSize * 1.25f))}
},
.custom = { .customData = this }
}) {