1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 07:46:38 +02:00

Fixed display bug when nicklist is displayed at bottom of screen

This commit is contained in:
Sebastien Helleu
2004-06-17 18:48:01 +00:00
parent 340176d635
commit 095f296529
6 changed files with 22 additions and 18 deletions
+2 -1
View File
@@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2004-06-13
ChangeLog - 2004-06-17
Version 0.0.7 (under dev!):
* fixed display bug when nicklist is displayed at bottom of screen
* added history limit (text buffer & commands)
Version 0.0.6 (2004-06-05):
+8 -8
View File
@@ -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;
}
+1
View File
@@ -59,6 +59,7 @@ gui_read_keyb ()
{
/* resize event */
case KEY_RESIZE:
gui_calculate_pos_size (gui_current_window);
gui_redraw_window (gui_current_window);
break;
/* previous window */
+2 -1
View File
@@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2004-06-13
ChangeLog - 2004-06-17
Version 0.0.7 (under dev!):
* fixed display bug when nicklist is displayed at bottom of screen
* added history limit (text buffer & commands)
Version 0.0.6 (2004-06-05):
+8 -8
View File
@@ -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;
}
+1
View File
@@ -59,6 +59,7 @@ gui_read_keyb ()
{
/* resize event */
case KEY_RESIZE:
gui_calculate_pos_size (gui_current_window);
gui_redraw_window (gui_current_window);
break;
/* previous window */