1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-03 12:16:44 +02:00

add ability to toggle groupchat peerlist with ctrl-b

This commit is contained in:
Jfreegman
2014-10-08 02:45:08 -04:00
parent cc0145d561
commit e6b18231c0
6 changed files with 80 additions and 26 deletions

View File

@ -59,7 +59,7 @@ void line_info_reset_start(ToxWindow *self, struct history *hst)
int y2, x2;
getmaxyx(self->window, y2, x2);
int side_offst = self->is_groupchat ? SIDEBAR_WIDTH : 0;
int side_offst = self->show_peerlist ? SIDEBAR_WIDTH : 0;
int top_offst = self->is_chat || self->is_prompt ? 2 : 0;
int max_y = (y2 - CHATBOX_HEIGHT - top_offst);
@ -246,7 +246,7 @@ static void line_info_check_queue(ToxWindow *self)
if (x2 <= SIDEBAR_WIDTH)
return;
int offst = self->is_groupchat ? SIDEBAR_WIDTH : 0; /* offset width of groupchat sidebar */
int offst = self->show_peerlist ? SIDEBAR_WIDTH : 0; /* offset width of groupchat sidebar */
int lines = 1 + line->newlines + (line->len / (x2 - offst));
int max_y = y2 - CHATBOX_HEIGHT;