diff options
author | frosch <frosch@openttd.org> | 2015-02-13 21:13:45 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2015-02-13 21:13:45 +0000 |
commit | e113f5e4a14c763ed433487f4d21e2f35e205e1b (patch) | |
tree | afcb033374f504ebde874649f3d5675bca2fca68 /src/window.cpp | |
parent | 1ebd85c1cc52efba447497c5e015b05f579a0dbb (diff) | |
download | openttd-e113f5e4a14c763ed433487f4d21e2f35e205e1b.tar.xz |
(svn r27146) -Fix: Make statusbar and chat-entry window use the same width as the toolbar. Otherwise they lack a size definition.
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/window.cpp b/src/window.cpp index 398ddf670..e053165f3 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -3388,7 +3388,7 @@ void RelocateAllWindows(int neww, int newh) continue; case WC_MAIN_TOOLBAR: - ResizeWindow(w, min(neww, w->window_desc->default_width) - w->width, 0, false); + ResizeWindow(w, min(neww, _toolbar_width) - w->width, 0, false); top = w->top; left = PositionMainToolbar(w); // changes toolbar orientation @@ -3400,14 +3400,15 @@ void RelocateAllWindows(int neww, int newh) break; case WC_STATUS_BAR: - ResizeWindow(w, min(neww, w->window_desc->default_width) - w->width, 0, false); + ResizeWindow(w, min(neww, _toolbar_width) - w->width, 0, false); top = newh - w->height; left = PositionStatusbar(w); break; case WC_SEND_NETWORK_MSG: - ResizeWindow(w, Clamp(neww, 320, 640) - w->width, 0, false); + ResizeWindow(w, min(neww, _toolbar_width) - w->width, 0, false); + top = newh - w->height - FindWindowById(WC_STATUS_BAR, 0)->height; left = PositionNetworkChatWindow(w); break; |