summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-09-15 21:10:14 +0000
committeryexo <yexo@openttd.org>2010-09-15 21:10:14 +0000
commit532003504e18226014c3845065d16835b4467043 (patch)
treeffea6bec1011ec7183c9bd5afbddb09c9ef9527e /src/window.cpp
parent7bb0cf9af61a9c971f848e4aece55c5bf208e09d (diff)
downloadopenttd-532003504e18226014c3845065d16835b4467043.tar.xz
(svn r20807) -Codechange: don't clamp the width of the main toolbar to 640 pixels
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 49039ec15..57fc81f4c 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -32,6 +32,7 @@
#include "settings_type.h"
#include "newgrf_debug.h"
#include "hotkeys.h"
+#include "toolbar_gui.h"
#include "table/sprites.h"
@@ -2690,7 +2691,7 @@ void RelocateAllWindows(int neww, int newh)
* in a 'backup'-desc that the window should always be centered. */
switch (w->window_class) {
case WC_MAIN_TOOLBAR:
- if (neww - w->width != 0) ResizeWindow(w, min(neww, 640) - w->width, 0);
+ ResizeWindow(w, min(neww, *_preferred_toolbar_size) - w->width, 0);
top = w->top;
left = PositionMainToolbar(w); // changes toolbar orientation