summaryrefslogtreecommitdiff
path: root/src/news_gui.cpp
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2021-04-21 15:22:45 +0100
committerMichael Lutz <michi@icosahedron.de>2021-04-21 23:12:10 +0200
commit2a0365b3d992fb602fd91b218b4a8647ddb46975 (patch)
tree54ec865630b8292ce84eb47fff78f407411926ab /src/news_gui.cpp
parent96b78bc2cd9790e89228c53b4803a78320fc20bd (diff)
downloadopenttd-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/news_gui.cpp')
-rw-r--r--src/news_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/news_gui.cpp b/src/news_gui.cpp
index 74c9bbbec..fdcb56a37 100644
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -1205,7 +1205,7 @@ struct MessageHistoryWindow : Window {
NewsItem *ni = _latest_news;
if (ni == nullptr) return;
- for (int n = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_MH_BACKGROUND, WD_FRAMERECT_TOP, this->line_height); n > 0; n--) {
+ for (int n = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_MH_BACKGROUND, WD_FRAMERECT_TOP); n > 0; n--) {
ni = ni->prev;
if (ni == nullptr) return;
}