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.
This commit is contained in:

committed by
Michael Lutz

parent
96b78bc2cd
commit
2a0365b3d9
@@ -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:
|
||||
|
Reference in New Issue
Block a user