diff options
author | alberth <alberth@openttd.org> | 2009-12-20 20:08:39 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-12-20 20:08:39 +0000 |
commit | 5a083f183e5ece4e379a12d7f5b927e54a83d04a (patch) | |
tree | 1d1fa960c0fffff8e0462b8086f4c46434b91773 /src/depot_gui.cpp | |
parent | 20debea202d87ce595b2ebc353d22204e9820efc (diff) | |
download | openttd-5a083f183e5ece4e379a12d7f5b927e54a83d04a.tar.xz |
(svn r18580) -Codechange: Use widget information only for setting scrollbar capacity.
Diffstat (limited to 'src/depot_gui.cpp')
-rw-r--r-- | src/depot_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index c053fffc4..171d437d3 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -941,12 +941,12 @@ struct DepotWindow : Window { virtual void OnResize() { NWidgetCore *nwi = this->GetWidget<NWidgetCore>(DEPOT_WIDGET_MATRIX); - this->vscroll.SetCapacity(nwi->current_y / (int)this->resize.step_height); + this->vscroll.SetCapacityFromWidget(this, DEPOT_WIDGET_MATRIX); if (this->type == VEH_TRAIN) { this->hscroll.SetCapacity(nwi->current_x - this->header_width - this->count_width); nwi->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START); } else { - this->hscroll.SetCapacity(nwi->current_x / (int)this->resize.step_width); + this->hscroll.SetCapacityFromWidget(this, DEPOT_WIDGET_MATRIX); nwi->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (this->hscroll.GetCapacity() << MAT_COL_START); } } |