summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-03-24 19:51:53 +0000
committerfrosch <frosch@openttd.org>2013-03-24 19:51:53 +0000
commit451e2ea02b0b9cced3a77b2ee056739e09d26178 (patch)
tree18e7f2b5a74aa4c56763578908d8429aaa40b88c /src
parent41ca81dc41449189e44de417481392dbf3f2ac8e (diff)
downloadopenttd-451e2ea02b0b9cced3a77b2ee056739e09d26178.tar.xz
(svn r25121) -Fix: Editboxes could become too small when resizing windows.
Diffstat (limited to 'src')
-rw-r--r--src/widget.cpp6
1 files changed, 4 insertions, 2 deletions
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);