fix: corregir padding asimétrico en HelpOverlay con getGlyphHeight()
Añade TextRenderer::getGlyphHeight() (ascent - descent, sin line_gap) y lo usa en calculateTextDimensions() para descontar el gap sobrante de la última línea, aproximando padding superior e inferior simétricos. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -361,3 +361,11 @@ int TextRenderer::getTextHeight() {
|
||||
|
||||
return TTF_GetFontHeight(font_);
|
||||
}
|
||||
|
||||
int TextRenderer::getGlyphHeight() {
|
||||
if (!isInitialized()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return TTF_GetFontAscent(font_) - TTF_GetFontDescent(font_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user