changeset 13217:d3bc1209268b draft

(svn r17724) -Codechange: Merge magic height values toghether in finances window.
author alberth <alberth@openttd.org>
date Tue, 06 Oct 2009 18:24:06 +0000
parents b2e6da395b1b
children 03a409fa4c29
files src/company_gui.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -91,8 +91,8 @@
 };
 
 static const ExpensesList _expenses_list_types[] = {
-	ExpensesList(_expenses_list_1, lengthof(_expenses_list_1), lengthof(_expenses_list_1) * 10),
-	ExpensesList(_expenses_list_2, lengthof(_expenses_list_2), lengthof(_expenses_list_2) * 10 + 3 * 12),
+	ExpensesList(_expenses_list_1, lengthof(_expenses_list_1), lengthof(_expenses_list_1) * 10 + 26),
+	ExpensesList(_expenses_list_2, lengthof(_expenses_list_2), lengthof(_expenses_list_2) * 10 + 3 * 12 + 26),
 };
 
 /** Widgets of the company finances windows. */
@@ -350,9 +350,9 @@
 				this->widget[CFW_EXPS_PANEL].bottom = this->widget[CFW_EXPS_PANEL].top;
 			}
 			int height = this->widget[CFW_EXPS_PANEL].bottom - this->widget[CFW_EXPS_PANEL].top + 1;
-			if (_expenses_list_types[type].height + 26 != height) {
+			if (_expenses_list_types[type].height != height) {
 				this->SetDirty();
-				ResizeWindowForWidget(this, CFW_EXPS_PANEL, 0, _expenses_list_types[type].height - height + 26);
+				ResizeWindowForWidget(this, CFW_EXPS_PANEL, 0, _expenses_list_types[type].height - height);
 				this->SetDirty();
 				return;
 			}