mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 05:10:11 +01:00
hud: only increase y if the pane contains graphs
This makes the layout of "fps,cpu" identical to "fps,stdout,cpu". Without this change, the ',' separator after 'stdout' would increase y and we would have a gap between the fps and cpu graphs. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38925>
This commit is contained in:
parent
f521a6270b
commit
3b4b5761aa
1 changed files with 5 additions and 4 deletions
|
|
@ -1508,14 +1508,15 @@ hud_parse_env_var(struct hud_context *hud, struct pipe_screen *screen,
|
||||||
if (!pane)
|
if (!pane)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
y += height + hud->font.glyph_height * (pane->num_graphs + 2);
|
|
||||||
y_simple += hud->font.glyph_height * (pane->num_graphs + 1);
|
|
||||||
height = 100;
|
|
||||||
|
|
||||||
if (pane && pane->num_graphs) {
|
if (pane && pane->num_graphs) {
|
||||||
|
y += height + hud->font.glyph_height * (pane->num_graphs + 2);
|
||||||
|
y_simple += hud->font.glyph_height * (pane->num_graphs + 1);
|
||||||
list_addtail(&pane->head, &hud->pane_list);
|
list_addtail(&pane->head, &hud->pane_list);
|
||||||
pane = NULL;
|
pane = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
height = 100;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ';':
|
case ';':
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue