From cdcc275e07240968e84bc92465ce96a2e742f2c9 Mon Sep 17 00:00:00 2001 From: nick black Date: Fri, 7 Feb 2020 09:53:19 -0500 Subject: [PATCH] HUD: always display a close button in upper right --- src/demo/highcon.c | 2 +- src/demo/hud.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/demo/highcon.c b/src/demo/highcon.c index 03963a137..0d2717fc0 100644 --- a/src/demo/highcon.c +++ b/src/demo/highcon.c @@ -84,7 +84,7 @@ int highcontrast_demo(struct notcurses* nc){ // right. start at the upper left, from the logical beginning of the array. cell c = CELL_TRIVIAL_INITIALIZER; cell_set_fg_alpha(&c, CELL_ALPHA_HIGHCONTRAST); - const char motto[] = "high contrast text "; + const char motto[] = " high contrast text "; do{ unsigned idx = iter % totcells; // first color for upper-left for(int yx = 0 ; yx < dimy * dimx ; ++yx){ diff --git a/src/demo/hud.c b/src/demo/hud.c index 84b1767ed..32417c979 100644 --- a/src/demo/hud.c +++ b/src/demo/hud.c @@ -181,7 +181,7 @@ int hud_schedule(const char* demoname){ cure = malloc(sizeof(*cure)); } elem* e = elems; - int plen = HUD_COLS - 4 - NSLEN; + int plen = HUD_COLS - 10 - NSLEN; while(e){ hook = &e->next; if(ncplane_printf_yx(hud, line, 0, "%-6d %*ju.%02jus %-*.*s", e->frames,