(svn r17853) -Codechange: remove the 'delta' parameter from OnResize; it was used in ways that aren't always wanted, causing bugs and the like. Also with nested widgets most reasons for handling OnResize have gone.
This commit is contained in:
@@ -564,7 +564,7 @@ public:
|
||||
this->SetDirty();
|
||||
}
|
||||
|
||||
virtual void OnResize(Point delta)
|
||||
virtual void OnResize()
|
||||
{
|
||||
this->vscroll.SetCapacity((this->widget[SLW_LIST].bottom - this->widget[SLW_LIST].top + 1) / 10);
|
||||
}
|
||||
@@ -1049,7 +1049,7 @@ struct StationViewWindow : public Window {
|
||||
DoCommandP(0, this->window_number, 0, CMD_RENAME_STATION | CMD_MSG(STR_ERROR_CAN_T_RENAME_STATION), NULL, str);
|
||||
}
|
||||
|
||||
virtual void OnResize(Point delta)
|
||||
virtual void OnResize()
|
||||
{
|
||||
ResizeButtons(this, SVW_LOCATION, SVW_RENAME);
|
||||
this->vscroll.SetCapacity((this->widget[SVW_WAITING].bottom - this->widget[SVW_WAITING].top + 1) / this->resize.step_height);
|
||||
@@ -1294,7 +1294,7 @@ struct SelectStationWindow : Window {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnResize(Point delta)
|
||||
virtual void OnResize()
|
||||
{
|
||||
this->vscroll.SetCapacity((this->GetWidget<NWidgetBase>(JSW_PANEL)->current_y - WD_FRAMERECT_TOP - WD_FRAMERECT_BOTTOM) / this->resize.step_height);
|
||||
}
|
||||
|
Reference in New Issue
Block a user