From 2a0365b3d992fb602fd91b218b4a8647ddb46975 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Wed, 21 Apr 2021 15:22:45 +0100 Subject: 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. --- src/framerate_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/framerate_gui.cpp') diff --git a/src/framerate_gui.cpp b/src/framerate_gui.cpp index 9ac78dc68..a2fd03044 100644 --- a/src/framerate_gui.cpp +++ b/src/framerate_gui.cpp @@ -683,7 +683,7 @@ struct FramerateWindow : Window { case WID_FRW_TIMES_AVERAGE: { /* Open time graph windows when clicking detail measurement lines */ const Scrollbar *sb = this->GetScrollbar(WID_FRW_SCROLLBAR); - int line = sb->GetScrolledRowFromWidget(pt.y - FONT_HEIGHT_NORMAL - VSPACING, this, widget, VSPACING, FONT_HEIGHT_NORMAL); + int line = sb->GetScrolledRowFromWidget(pt.y, this, widget, VSPACING + FONT_HEIGHT_NORMAL); if (line != INT_MAX) { line++; /* Find the visible line that was clicked */ -- cgit v1.2.3-54-g00ecf