changeset 13603:d035d13afeb3 draft

(svn r18127) -Codechange: Adjust station accept/rating list height by number of lines instead of pixels.
author peter1138 <peter1138@openttd.org>
date Mon, 16 Nov 2009 20:40:35 +0000 (2009-11-16)
parents 47a93be74755
children 3e06828e076b
files src/station_gui.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -779,8 +779,8 @@
 
 	/** Height of the #SVW_ACCEPTLIST widget for different views. */
 	enum AcceptListHeight {
-		ALH_RATING  = 130, ///< Height of the cargo ratings view.
-		ALH_ACCEPTS = 30,  ///< Height of the accepted cargo view.
+		ALH_RATING  = 13, ///< Height of the cargo ratings view.
+		ALH_ACCEPTS = 3,  ///< Height of the accepted cargo view.
 	};
 
 	StationViewWindow(const WindowDesc *desc, WindowNumber window_number) : Window()
@@ -812,7 +812,7 @@
 				break;
 
 			case SVW_ACCEPTLIST:
-				size->height = WD_FRAMERECT_TOP + ((this->GetWidget<NWidgetCore>(SVW_ACCEPTS)->widget_data == STR_STATION_VIEW_RATINGS_BUTTON) ? ALH_ACCEPTS : ALH_RATING) + WD_FRAMERECT_TOP;
+				size->height = WD_FRAMERECT_TOP + ((this->GetWidget<NWidgetCore>(SVW_ACCEPTS)->widget_data == STR_STATION_VIEW_RATINGS_BUTTON) ? ALH_ACCEPTS : ALH_RATING) * FONT_HEIGHT_NORMAL + WD_FRAMERECT_BOTTOM;
 				break;
 		}
 	}