1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2025-04-21 12:27:27 +03:00

Use the font's suggested line height instead of its ascent and descent.

In well-described fonts, this enables multi-line text (e.g. in manuals) to be
more readable.

The term "height" is also replaced with "line spacing" in Font's code.
This commit is contained in:
Nebuleon Fumika
2014-06-18 20:07:09 +00:00
committed by Maarten ter Huurne
parent 349e758b3b
commit 099bd24556
14 changed files with 27 additions and 27 deletions

View File

@@ -205,7 +205,7 @@ void Menu::paint(Surface &s) {
// Paint section headers.
s.box(width / 2 - linkWidth / 2, 0, linkWidth, topBarHeight, selectionBgColor);
const uint sectionLinkPadding = (topBarHeight - 32 - font.getHeight()) / 3;
const uint sectionLinkPadding = (topBarHeight - 32 - font.getLineSpacing()) / 3;
const uint numSections = sections.size();
for (int i = leftSection; i <= rightSection; i++) {
uint j = (centerSection + numSections + i) % numSections;