(svn r27577) -Fix [FS#6386]: Dock and roadstop picker, client list and town authority window did not auto-resize according to their content when they were positioned at the bottom of the screen. (Eearslya)

pull/8/head
frosch 8 years ago
parent 9aa9d7e898
commit b1272ee714

@ -433,7 +433,7 @@ public:
* Never make the window smaller to avoid oscillating if the size change affects the acceptance.
* (This is the case, if making the window bigger moves the mouse into the window.) */
if (top > bottom) {
ResizeWindow(this, 0, top - bottom);
ResizeWindow(this, 0, top - bottom, false);
}
}

@ -1892,7 +1892,7 @@ struct NetworkClientListWindow : Window {
int diff = (num + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM) - (this->GetWidget<NWidgetBase>(WID_CL_PANEL)->current_y);
/* If height is changed */
if (diff != 0) {
ResizeWindow(this, 0, diff);
ResizeWindow(this, 0, diff, false);
return false;
}
return true;

@ -1002,7 +1002,7 @@ struct BuildRoadStationWindow : public PickerWindowBase {
* Never make the window smaller to avoid oscillating if the size change affects the acceptance.
* (This is the case, if making the window bigger moves the mouse into the window.) */
if (top > bottom) {
ResizeWindow(this, 0, top - bottom);
ResizeWindow(this, 0, top - bottom, false);
}
}

@ -177,7 +177,7 @@ public:
y = y + WD_FRAMERECT_BOTTOM - nwid->pos_y; // Compute needed size of the widget.
if (y > nwid->current_y) {
/* If the company list is too big to fit, mark ourself dirty and draw again. */
ResizeWindow(this, 0, y - nwid->current_y);
ResizeWindow(this, 0, y - nwid->current_y, false);
}
}

Loading…
Cancel
Save