From 095f29652994075962cdfc43265e84fb690e9421 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 17 Jun 2004 18:48:01 +0000 Subject: Fixed display bug when nicklist is displayed at bottom of screen --- src/gui/curses/gui-display.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gui/curses/gui-display.c') diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c index 310493c3a..64ac7e8c3 100644 --- a/src/gui/curses/gui-display.c +++ b/src/gui/curses/gui-display.c @@ -227,10 +227,10 @@ gui_calculate_pos_size (t_gui_window *window) case CFG_LOOK_NICKLIST_TOP: nick_count (CHANNEL(window), &num_nicks, &num_op, &num_halfop, &num_voice, &num_normal); - if (((max_length + 1) * num_nicks) % COLS == 0) - lines = ((max_length + 1) * num_nicks) / COLS; + if (((max_length + 2) * num_nicks) % COLS == 0) + lines = ((max_length + 2) * num_nicks) / COLS; else - lines = (((max_length + 1) * num_nicks) / COLS) + 1; + lines = (((max_length + 2) * num_nicks) / COLS) + 1; window->win_chat_x = 0; window->win_chat_y = 1 + (lines + 1); window->win_chat_width = COLS; @@ -246,10 +246,10 @@ gui_calculate_pos_size (t_gui_window *window) case CFG_LOOK_NICKLIST_BOTTOM: nick_count (CHANNEL(window), &num_nicks, &num_op, &num_halfop, &num_voice, &num_normal); - if (((max_length + 1) * num_nicks) % COLS == 0) - lines = ((max_length + 1) * num_nicks) / COLS; + if (((max_length + 2) * num_nicks) % COLS == 0) + lines = ((max_length + 2) * num_nicks) / COLS; else - lines = (((max_length + 1) * num_nicks) / COLS) + 1; + lines = (((max_length + 2) * num_nicks) / COLS) + 1; window->win_chat_x = 0; window->win_chat_y = 1; window->win_chat_width = COLS; @@ -778,9 +778,9 @@ gui_draw_window_nick (t_gui_window *window) if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) || (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM)) { - if (y >= window->win_nick_height - 1) + if (y - ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM) ? 1 : 0) >= window->win_nick_height - 1) { - column += max_length + 1; + column += max_length + 2; y = (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ? 0 : 1; } -- cgit v1.2.3