aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Kucheria <amit.kucheria@linaro.org>2011-01-12 04:54:37 +0530
committerAmit Kucheria <amit.kucheria@linaro.org>2011-01-12 04:54:37 +0530
commit0a4d019e12ff334e2b8104329da73fcee52749cd (patch)
tree0b4ddd794616dfc31c65b26eb1f740a9d4780e1f
parente7bbf7896b8dfab954427b8cfee8832ec5924740 (diff)
Print a compact header
Print the menu items in the header closer together
-rw-r--r--display.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/display.c b/display.c
index 5cdf78a..ee2869a 100644
--- a/display.c
+++ b/display.c
@@ -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);