(svn r17786) -Fix [FS#3265]: graphical glitches (matrices/scrollbars with wrong 'size') upon reiniting windows
This commit is contained in:
@@ -566,7 +566,7 @@ public:
|
||||
|
||||
virtual void OnResize(Point delta)
|
||||
{
|
||||
this->vscroll.UpdateCapacity(delta.y / 10);
|
||||
this->vscroll.SetCapacity((this->widget[SLW_LIST].bottom - this->widget[SLW_LIST].top + 1) / 10);
|
||||
}
|
||||
|
||||
virtual void OnInvalidateData(int data)
|
||||
@@ -1052,7 +1052,7 @@ struct StationViewWindow : public Window {
|
||||
virtual void OnResize(Point delta)
|
||||
{
|
||||
if (delta.x != 0) ResizeButtons(this, SVW_LOCATION, SVW_RENAME);
|
||||
this->vscroll.UpdateCapacity(delta.y / (int)this->resize.step_height);
|
||||
this->vscroll.SetCapacity((this->widget[SVW_WAITING].bottom - this->widget[SVW_WAITING].top + 1) / this->resize.step_height);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1296,7 +1296,7 @@ struct SelectStationWindow : Window {
|
||||
|
||||
virtual void OnResize(Point delta)
|
||||
{
|
||||
this->vscroll.UpdateCapacity(delta.y / (int)this->resize.step_height);
|
||||
this->vscroll.SetCapacity((this->GetWidget<NWidgetBase>(JSW_PANEL)->current_y - WD_FRAMERECT_TOP - WD_FRAMERECT_BOTTOM) / this->resize.step_height);
|
||||
}
|
||||
|
||||
virtual void OnInvalidateData(int data)
|
||||
|
Reference in New Issue
Block a user