1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-02 11:29:10 +00:00

(svn r25121) -Fix: Editboxes could become too small when resizing windows.

This commit is contained in:
frosch
2013-03-24 19:51:53 +00:00
parent 41ca81dc41
commit 451e2ea02b

View File

@@ -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);