mirror of https://github.com/OpenTTD/OpenTTD
(svn r12714) -Fix [FS#1904]: do not move windows below the toolbar on resizes unless they would go behind the toolbar.
parent
2152e1c420
commit
fd38b3f850
|
@ -2316,7 +2316,7 @@ void RelocateAllWindows(int neww, int newh)
|
||||||
|
|
||||||
const Window *wt = FindWindowById(WC_MAIN_TOOLBAR, 0);
|
const Window *wt = FindWindowById(WC_MAIN_TOOLBAR, 0);
|
||||||
if (wt != NULL) {
|
if (wt != NULL) {
|
||||||
if (top < wt->height) top = wt->height;
|
if (top < wt->height && wt->left < (w->left + w->width) && (wt->left + wt->width) > w->left) top = wt->height;
|
||||||
if (top >= newh) top = newh - 1;
|
if (top >= newh) top = newh - 1;
|
||||||
} else {
|
} else {
|
||||||
if (top < 0) top = 0;
|
if (top < 0) top = 0;
|
||||||
|
|
Loading…
Reference in New Issue