diff options
author | frosch <frosch@openttd.org> | 2015-06-20 12:29:36 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2015-06-20 12:29:36 +0000 |
commit | 97d7ad8914a6ca3e9c40dd49609e91249fef20f5 (patch) | |
tree | 5d19ba98f727d09a053164bb075073d1adf29384 | |
parent | 04c9ce97531ffaf68c48c830a7aa15efa2345284 (diff) | |
download | openttd-97d7ad8914a6ca3e9c40dd49609e91249fef20f5.tar.xz |
(svn r27303) -Fix [FS#6321]: SetMinimalSize was ignored for WWT_EDITBOX.
-rw-r--r-- | src/widget.cpp | 2 |
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 */ } |