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:
Peter Nelson
2023-11-21 19:04:24 +00:00
committed by GitHub
parent 96ec9c1b47
commit c18a1494b7
57 changed files with 369 additions and 381 deletions

View File

@@ -200,12 +200,12 @@ struct TimetableWindow : Window {
case WID_VT_ARRIVAL_DEPARTURE_SELECTION:
case WID_VT_TIMETABLE_PANEL:
resize->height = FONT_HEIGHT_NORMAL;
resize->height = GetCharacterHeight(FS_NORMAL);
size->height = 8 * resize->height + padding.height;
break;
case WID_VT_SUMMARY_PANEL:
size->height = 2 * FONT_HEIGHT_NORMAL + padding.height;
size->height = 2 * GetCharacterHeight(FS_NORMAL) + padding.height;
break;
}
}
@@ -411,7 +411,7 @@ struct TimetableWindow : Window {
}
i++;
tr.top += FONT_HEIGHT_NORMAL;
tr.top += GetCharacterHeight(FS_NORMAL);
}
}
@@ -470,7 +470,7 @@ struct TimetableWindow : Window {
DrawString(tr.left, tr.right, tr.top, STR_TIMETABLE_DEPARTURE, i == selected ? TC_WHITE : TC_BLACK);
}
}
tr.top += FONT_HEIGHT_NORMAL;
tr.top += GetCharacterHeight(FS_NORMAL);
}
}
@@ -488,7 +488,7 @@ struct TimetableWindow : Window {
SetTimetableParams(0, 1, total_time);
DrawString(tr, v->orders->IsCompleteTimetable() ? STR_TIMETABLE_TOTAL_TIME : STR_TIMETABLE_TOTAL_TIME_INCOMPLETE);
}
tr.top += FONT_HEIGHT_NORMAL;
tr.top += GetCharacterHeight(FS_NORMAL);
if (v->timetable_start != 0) {
/* We are running towards the first station so we can start the