Mercurial > hg > openttd
changeset 20172:915b07210c0a draft
(svn r25121) -Fix: Editboxes could become too small when resizing windows.
author | frosch <frosch@openttd.org> |
---|---|
date | Sun, 24 Mar 2013 19:51:53 +0000 |
parents | 8c9445245bb5 |
children | 4ea6dc477f8c |
files | src/widget.cpp |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/widget.cpp +++ b/src/widget.cpp @@ -2081,10 +2081,12 @@ 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);