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:
committed by
Maarten ter Huurne
parent
349e758b3b
commit
099bd24556
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user