summaryrefslogtreecommitdiff
path: root/src/settings_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r--src/settings_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index 37856e305..82c45a53d 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -1625,7 +1625,7 @@ struct GameSettingsWindow : Window {
virtual void OnResize()
{
- this->vscroll.SetCapacity((this->GetWidget<NWidgetBase>(SETTINGSEL_OPTIONSPANEL)->current_y - SETTINGTREE_TOP_OFFSET - SETTINGTREE_BOTTOM_OFFSET) / this->resize.step_height);
+ this->vscroll.SetCapacityFromWidget(this, SETTINGSEL_OPTIONSPANEL, SETTINGTREE_TOP_OFFSET + SETTINGTREE_BOTTOM_OFFSET);
}
};