Skip to content

overlay: fix bottom padding in hud_compact - #2201

Open
JROtto5 wants to merge 1 commit into
flightlessmango:masterfrom
JROtto5:fix/2111-bottom-padding
Open

JROtto5 wants to merge 1 commit into
flightlessmango:masterfrom
JROtto5:fix/2111-bottom-padding

Conversation

@JROtto5

@JROtto5 JROtto5 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Closes #2111.

hud_compact sets WindowPadding to 0, but the window still ends 11 px past the cursor, leaving a strip under the last row that the top and sides don't have. It now ends at the last line box, plus the 2 px imgui's rounding can put descenders below it and the outline thickness. Other layouts keep the +11.

Gap under the lowest text pixel on glxgears screenshots with background_color=ff00ff,legacy_layout=0,gpu_stats,cpu_stats,fps,exec_name, master -> this, at font_size 16/24/64: hud_compact goes 4/3/2 -> 0/0/0, hud_compact + horizontal 7/6/12 -> 3/3/10. Non-compact layouts are unchanged. With text_outline=0 it's 5 -> 0, and a positive cellpadding_y stays on both edges (0.5: top 7, bottom 12 -> 8).

What horizontal keeps is the main font's descent. Nothing there draws a descender by default, but I didn't want to clip one from a custom font.

With WindowPadding at 0 the fixed +11 px left a visible strip under the
last row. End the window at the last line box instead, plus the 2 font px
imgui's rounding can put descenders past it and the outline thickness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Bottom padding is bigger than the rest of the padding

1 participant