summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-02-18 13:19:57 +0000
committerpeter1138 <peter1138@openttd.org>2008-02-18 13:19:57 +0000
commita0fda5b96922a98fe652ff6e6e9aa95e7f045f1e (patch)
tree3c619e7cc51c7d9ab2c77ac577c952983341e403 /src
parentb3f304cde3400d08f1513c8a80e75e7edab2993c (diff)
downloadopenttd-a0fda5b96922a98fe652ff6e6e9aa95e7f045f1e.tar.xz
(svn r12175) -Fix (r12174): Ensure the patches window is centred properly.
Diffstat (limited to 'src')
-rw-r--r--src/settings_gui.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index 15b41b32c..34790acc0 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -892,6 +892,9 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e)
/* Resize the window to fit the largest patch tab */
ResizeWindowForWidget(w, PATCHSEL_OPTIONSPANEL, 0, patches_max * 11);
+ /* Recentre the window for the new size */
+ w->top = w->top - (patches_max * 11) / 2;
+
w->LowerWidget(4);
} break;