Codechange: Remove FONT_HEIGHT_... macros. (#11481)
These make it look like we're dealing with a constant, but actually each is a call to `GetCharacterHeight(...)`.
This commit is contained in:
@@ -1140,7 +1140,7 @@ private:
|
||||
public:
|
||||
BuildRoadStationWindow(WindowDesc *desc, Window *parent, RoadStopType rs) : PickerWindowBase(desc, parent), filter_editbox(EDITBOX_MAX_SIZE * MAX_CHAR_LENGTH, EDITBOX_MAX_SIZE)
|
||||
{
|
||||
this->coverage_height = 2 * FONT_HEIGHT_NORMAL + WidgetDimensions::scaled.vsep_normal;
|
||||
this->coverage_height = 2 * GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.vsep_normal;
|
||||
this->vscrollList = nullptr;
|
||||
this->vscrollMatrix = nullptr;
|
||||
this->roadStopType = rs;
|
||||
@@ -1349,7 +1349,7 @@ public:
|
||||
d = maxdim(d, GetStringBoundingBox(RoadStopClass::Get(rs_class)->name));
|
||||
}
|
||||
size->width = std::max(size->width, d.width + padding.width);
|
||||
this->line_height = FONT_HEIGHT_NORMAL + WidgetDimensions::scaled.matrix.Vertical();
|
||||
this->line_height = GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.matrix.Vertical();
|
||||
size->height = 5 * this->line_height;
|
||||
resize->height = this->line_height;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user