summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-10-06 18:24:06 +0000
committeralberth <alberth@openttd.org>2009-10-06 18:24:06 +0000
commit95dfee1c604d420df9f0d5860fcddf29e657fc32 (patch)
tree613b151e03ba309b3a822ecf7fb628d61345a1dc /src
parent68a20b21306a726ba51f5fdefec3bcf238e31489 (diff)
downloadopenttd-95dfee1c604d420df9f0d5860fcddf29e657fc32.tar.xz
(svn r17724) -Codechange: Merge magic height values toghether in finances window.
Diffstat (limited to 'src')
-rw-r--r--src/company_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index 52bfcf480..c75bb5ff2 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -91,8 +91,8 @@ struct ExpensesList {
};
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 @@ struct CompanyFinancesWindow : Window {
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;
}