diff options
author | alex <alex@ASUS> | 2018-09-06 19:06:01 +0200 |
---|---|---|
committer | alex <alex@ASUS> | 2018-09-06 19:06:01 +0200 |
commit | df07aea3086854ab41229fefdab8fdf54a22a832 (patch) | |
tree | 63e95ebb524e35d02618c4dc008f07a8ca6f2593 | |
parent | 025406b5d8b906fd10a2ff5060268f4c2d7dddf1 (diff) |
Fix subtitle to be in the center of the window
-rw-r--r-- | libalx/src/alx_ncur.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libalx/src/alx_ncur.c b/libalx/src/alx_ncur.c index 9febf2f..116a3bb 100644 --- a/libalx/src/alx_ncur.c +++ b/libalx/src/alx_ncur.c @@ -454,7 +454,7 @@ void alx_ncur_prn_subtitle (WINDOW *win, const char *subtitle) len = strlen(subtitle);
/* Print subtitle centered */
- mvwaddch(win, h - 1, (w - len)/2 - 1, ACS_RTEE);
+ mvwaddch(win, h - 1, (w - (len + 2))/2 - 1, ACS_RTEE);
wprintw(win, " %s ", subtitle);
waddch(win, ACS_LTEE);
}
|