summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/widget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index a6176bd31..350db9d14 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -2284,7 +2284,7 @@ void NWidgetLeaf::SetupSmallestSize(Window *w, bool init_array)
}
case WWT_EDITBOX: {
Dimension sprite_size = GetSpriteSize(_current_text_dir == TD_RTL ? SPR_IMG_DELETE_RIGHT : SPR_IMG_DELETE_LEFT);
- size.width = 30 + sprite_size.width;
+ size.width = max(size.width, 30 + sprite_size.width);
size.height = max(sprite_size.height, GetStringBoundingBox("_").height + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM);
/* FALL THROUGH */
}