forked from mirror/OpenTTD
(svn r27146) -Fix: Make statusbar and chat-entry window use the same width as the toolbar. Otherwise they lack a size definition.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user