Merge branch 'master' into jgrpp

# Conflicts:
#	src/landscape.cpp
#	src/landscape.h
#	src/misc_gui.cpp
#	src/newgrf_commons.cpp
#	src/order_cmd.cpp
#	src/pathfinder/yapf/yapf_base.hpp
#	src/station_cmd.cpp
#	src/tunnelbridge_cmd.cpp
#	src/vehicle.cpp
#	src/water_cmd.cpp
#	src/window.cpp
This commit is contained in:
Jonathan G Rennison
2024-03-09 21:44:36 +00:00
119 changed files with 1359 additions and 1148 deletions

View File

@@ -3724,6 +3724,18 @@ void RelocateAllWindows(int neww, int newh)
{
CloseWindowById(WC_DROPDOWN_MENU, 0);
/* Reposition toolbar then status bar before other all windows. */
if (Window *wt = FindWindowById(WC_MAIN_TOOLBAR, 0); wt != nullptr) {
ResizeWindow(wt, std::min<uint>(neww, _toolbar_width) - wt->width, 0, false);
wt->left = PositionMainToolbar(wt);
}
if (Window *ws = FindWindowById(WC_STATUS_BAR, 0); ws != nullptr) {
ResizeWindow(ws, std::min<uint>(neww, _toolbar_width) - ws->width, 0, false);
ws->top = newh - ws->height;
ws->left = PositionStatusbar(ws);
}
for (Window *w : Window::IterateFromBack()) {
int left, top;
/* XXX - this probably needs something more sane. For example specifying
@@ -3735,24 +3747,14 @@ void RelocateAllWindows(int neww, int newh)
continue;
case WC_MAIN_TOOLBAR:
ResizeWindow(w, std::min<uint>(neww, _toolbar_width) - w->width, 0, false);
top = w->top;
left = PositionMainToolbar(w); // changes toolbar orientation
break;
case WC_STATUS_BAR:
continue;
case WC_NEWS_WINDOW:
top = newh - w->height;
left = PositionNewsMessage(w);
break;
case WC_STATUS_BAR:
ResizeWindow(w, std::min<uint>(neww, _toolbar_width) - w->width, 0, false);
top = newh - w->height;
left = PositionStatusbar(w);
break;
case WC_SEND_NETWORK_MSG:
ResizeWindow(w, std::min<uint>(neww, _toolbar_width) - w->width, 0, false);