From 451e2ea02b0b9cced3a77b2ee056739e09d26178 Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 24 Mar 2013 19:51:53 +0000 Subject: (svn r25121) -Fix: Editboxes could become too small when resizing windows. --- src/widget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/widget.cpp') diff --git a/src/widget.cpp b/src/widget.cpp index c3f9eca29..cebff2e89 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -2081,10 +2081,12 @@ NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, int index, uint16 data, this->SetFill(0, 0); break; - case WWT_EDITBOX: - this->SetMinimalSize(10, 0); + case WWT_EDITBOX: { + Dimension sprite_size = GetSpriteSize(_current_text_dir == TD_RTL ? SPR_IMG_DELETE_RIGHT : SPR_IMG_DELETE_LEFT); + this->SetMinimalSize(30 + sprite_size.width, sprite_size.height); this->SetFill(0, 0); break; + } case WWT_CAPTION: this->SetFill(1, 0); -- cgit v1.2.3-54-g00ecf