forked from mirror/OpenTTD
Codechange: add and use GetString over directly accessing widget_data
This commit is contained in:
@@ -906,7 +906,7 @@ public:
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_TD_SORT_ORDER: {
|
||||
Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
|
||||
Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->GetString());
|
||||
d.width += padding.width + Window::SortButtonWidth() * 2; // Doubled since the string is centred and it also looks better.
|
||||
d.height += padding.height;
|
||||
size = maxdim(size, d);
|
||||
|
Reference in New Issue
Block a user