changeset 19639:df862530409b draft

(svn r24548) -Add: Extra group line in the group gui, if possible (Juanjo).
author alberth <alberth@openttd.org>
date Sat, 22 Sep 2012 19:14:06 +0000
parents d7ce007e41c5
children f35ac2b21891
files src/group_gui.cpp
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -342,11 +342,8 @@
 				max_icon_height = max(max_icon_height, GetSpriteSize(this->GetWidget<NWidgetCore>(WID_GL_DELETE_GROUP)->widget_data).height);
 				max_icon_height = max(max_icon_height, GetSpriteSize(this->GetWidget<NWidgetCore>(WID_GL_REPLACE_PROTECTION)->widget_data).height);
 
-				/* ... plus the statusbar below the vehicle list */
-				if (max_icon_height > FONT_HEIGHT_NORMAL) max_icon_height -= FONT_HEIGHT_NORMAL;
-
-				/* The size must be a multiple of tiny_step_height for the resizing to work */
-				size->height -= this->tiny_step_height * CeilDiv(max_icon_height, this->tiny_step_height);
+				/* Get a multiple of tiny_step_height of that amount */
+				size->height = Ceil(size->height - max_icon_height, tiny_step_height);
 				break;
 			}