diff options
author | Peter Nelson <peter1138@openttd.org> | 2021-04-21 15:22:45 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-04-21 23:12:10 +0200 |
commit | 2a0365b3d992fb602fd91b218b4a8647ddb46975 (patch) | |
tree | 54ec865630b8292ce84eb47fff78f407411926ab /src/station_gui.cpp | |
parent | 96b78bc2cd9790e89228c53b4803a78320fc20bd (diff) | |
download | openttd-2a0365b3d992fb602fd91b218b4a8647ddb46975.tar.xz |
Cleanup: Remove unnecessary parameter of GetScrolledRowFromWidget()
Line height defaults to the resize height of the relevant widget, which is
set in all cases. Therefore it is not necessary to specify this value every time.
Additionally fixes scrolled padding for the framerate window.
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r-- | src/station_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp index b4156261b..d21ba5f73 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -529,7 +529,7 @@ public: { switch (widget) { case WID_STL_LIST: { - uint id_v = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_STL_LIST, 0, FONT_HEIGHT_NORMAL); + uint id_v = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_STL_LIST); if (id_v >= this->stations.size()) return; // click out of list bound const Station *st = this->stations[id_v]; @@ -1906,7 +1906,7 @@ struct StationViewWindow : public Window { { switch (widget) { case WID_SV_WAITING: - this->HandleCargoWaitingClick(this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_SV_WAITING, WD_FRAMERECT_TOP, FONT_HEIGHT_NORMAL) - this->vscroll->GetPosition()); + this->HandleCargoWaitingClick(this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_SV_WAITING, WD_FRAMERECT_TOP) - this->vscroll->GetPosition()); break; case WID_SV_CATCHMENT: |