Codechange: refactor string list dimension finding into a separate function
This commit is contained in:
@@ -190,10 +190,7 @@ public:
|
||||
break;
|
||||
}
|
||||
case WID_BBS_DROPDOWN_CRITERIA: {
|
||||
Dimension d = {0, 0};
|
||||
for (const StringID *str = BuildBridgeWindow::sorter_names; *str != INVALID_STRING_ID; str++) {
|
||||
d = maxdim(d, GetStringBoundingBox(*str));
|
||||
}
|
||||
Dimension d = GetStringListBoundingBox(BuildBridgeWindow::sorter_names);
|
||||
d.width += padding.width;
|
||||
d.height += padding.height;
|
||||
size = maxdim(size, d);
|
||||
|
||||
Reference in New Issue
Block a user