mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-03 01:38:09 +01:00
Codechange: Replace dropdown's magic 2 with appropriate WidgetDimension. (#12869)
This commit is contained in:
parent
7fb3d1a197
commit
cd739c2c33
@ -319,11 +319,11 @@ struct DropdownWindow : Window {
|
||||
}
|
||||
this->click_delay = 2;
|
||||
} else {
|
||||
if (_cursor.pos.y <= this->top + 2) {
|
||||
if (_cursor.pos.y <= this->top + WidgetDimensions::scaled.dropdownlist.top) {
|
||||
/* Cursor is above the list, set scroll up */
|
||||
this->scrolling = -1;
|
||||
return;
|
||||
} else if (_cursor.pos.y >= this->top + this->height - 2) {
|
||||
} else if (_cursor.pos.y >= this->top + this->height - WidgetDimensions::scaled.dropdownlist.bottom) {
|
||||
/* Cursor is below list, set scroll down */
|
||||
this->scrolling = 1;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user