diff --git a/src/picker_gui.cpp b/src/picker_gui.cpp index f1fd6f661b..4cb2f16c55 100644 --- a/src/picker_gui.cpp +++ b/src/picker_gui.cpp @@ -275,10 +275,11 @@ void PickerWindow::DrawWidget(const Rect &r, WidgetID widget) const Rect ir = r.Shrink(WidgetDimensions::scaled.matrix); const int selected = this->callbacks.GetSelectedClass(); const auto vscroll = this->GetScrollbar(WID_PW_CLASS_SCROLL); + const int y_step = this->GetWidget(widget)->resize_y; auto [first, last] = vscroll->GetVisibleRangeIterators(this->classes); for (auto it = first; it != last; ++it) { DrawString(ir, this->callbacks.GetClassName(*it), *it == selected ? TC_WHITE : TC_BLACK); - ir.top += this->resize.step_height; + ir.top += y_step; } break; }