diff options
author | Amit Kucheria <amit.kucheria@linaro.org> | 2011-01-12 04:54:37 +0530 |
---|---|---|
committer | Amit Kucheria <amit.kucheria@linaro.org> | 2011-01-12 04:54:37 +0530 |
commit | 0a4d019e12ff334e2b8104329da73fcee52749cd (patch) | |
tree | 0b4ddd794616dfc31c65b26eb1f740a9d4780e1f | |
parent | e7bbf7896b8dfab954427b8cfee8832ec5924740 (diff) |
Print a compact header
Print the menu items in the header closer together
-rw-r--r-- | display.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -139,12 +139,14 @@ void create_selectedwindow(void) void show_header(void) { int i, j = 0; + int curr_pointer = 0; wattrset(header_win, COLOR_PAIR(PT_COLOR_HEADER_BAR)); wbkgd(header_win, COLOR_PAIR(PT_COLOR_HEADER_BAR)); werase(header_win); - print(header_win, 0, 0, "PowerDebug %s", VERSION); + print(header_win, curr_pointer, 0, "PowerDebug %s", VERSION); + curr_pointer += 20; for (i = 0; i < TOTAL_FEATURE_WINS; i++) { if (selectedwindow == i) @@ -152,8 +154,8 @@ void show_header(void) else wattroff(header_win, A_REVERSE); - print(header_win, i*(maxx / TOTAL_FEATURE_WINS) + 20, 0, - " %s ", win_names[i]); + print(header_win, curr_pointer, 0, " %s ", win_names[i]); + curr_pointer += strlen(win_names[i]) + 2; } wrefresh(header_win); werase(footer_win); |