mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 02:23:02 +01:00
made borders-lines crisp
This commit is contained in:
parent
319eec21fe
commit
1064e8d144
@ -353,7 +353,7 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
|
||||
|
||||
/* Draw status bar */
|
||||
StatusBar *statusbar = (StatusBar *) self->stb;
|
||||
mvwhline(statusbar->topline, 1, 0, '-', x);
|
||||
mvwhline(statusbar->topline, 1, 0, ACS_HLINE, x);
|
||||
wmove(statusbar->topline, 0, 0);
|
||||
|
||||
/* Draw name, status and note in statusbar */
|
||||
@ -402,7 +402,7 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
|
||||
self->x = x;
|
||||
|
||||
/* Truncate note if it doesn't fit in statusbar */
|
||||
uint16_t maxlen = x - getcurx(statusbar->topline) - 6;
|
||||
uint16_t maxlen = x - getcurx(statusbar->topline) - 4;
|
||||
if (statusbar->statusmsg_len > maxlen) {
|
||||
statusbar->statusmsg[maxlen] = '\0';
|
||||
statusbar->statusmsg_len = maxlen;
|
||||
@ -410,12 +410,12 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
|
||||
|
||||
if (statusbar->statusmsg[0]) {
|
||||
wattron(statusbar->topline, A_BOLD);
|
||||
wprintw(statusbar->topline, " | %s | ", statusbar->statusmsg);
|
||||
wprintw(statusbar->topline, " - %s ", statusbar->statusmsg);
|
||||
wattroff(statusbar->topline, A_BOLD);
|
||||
}
|
||||
|
||||
wprintw(statusbar->topline, "\n");
|
||||
mvwhline(ctx->linewin, 0, 0, '_', x);
|
||||
mvwhline(ctx->linewin, 0, 0, ACS_HLINE, x);
|
||||
wrefresh(self->window);
|
||||
}
|
||||
|
||||
|
@ -281,7 +281,7 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
|
||||
}
|
||||
|
||||
/* Truncate note if it doesn't fit on one line */
|
||||
uint16_t maxlen = x - getcurx(self->window) - 2;
|
||||
uint16_t maxlen = x - getcurx(self->window) - 4;
|
||||
if (friends[f].statusmsg_len > maxlen) {
|
||||
friends[f].statusmsg[maxlen-3] = '\0';
|
||||
strcat(friends[f].statusmsg, "...");
|
||||
|
@ -119,9 +119,9 @@ static void groupchat_onGroupNamelistChange(ToxWindow *self, Tox *m, int groupnu
|
||||
if (self->num != groupnum)
|
||||
return;
|
||||
|
||||
int num_peers = tox_group_number_peers(m, groupnum);
|
||||
groupchats[groupnum].num_peers = MIN(MAX_GROUP_PEERS, num_peers);
|
||||
tox_group_copy_names(m, groupnum, groupchats[groupnum].peer_names, num_peers);
|
||||
groupchats[groupnum].num_peers = MIN(tox_group_number_peers(m, groupnum), MAX_GROUP_PEERS);
|
||||
tox_group_copy_names(m, groupnum, groupchats[groupnum].peer_names, groupchats[groupnum].num_peers);
|
||||
//qsort(groupchats[groupnum].peer_names,
|
||||
}
|
||||
|
||||
static void groupchat_onKey(ToxWindow *self, Tox *m, wint_t key)
|
||||
@ -214,8 +214,9 @@ static void groupchat_onDraw(ToxWindow *self, Tox *m)
|
||||
|
||||
ChatContext *ctx = (ChatContext *) self->chatwin;
|
||||
wclrtobot(ctx->sidebar);
|
||||
mvwhline(ctx->linewin, 0, 0, '_', x);
|
||||
mvwvline(ctx->sidebar, 0, 0,'|', x);
|
||||
mvwhline(ctx->linewin, 0, 0, ACS_HLINE, x);
|
||||
mvwvline(ctx->sidebar, 0, 0, ACS_VLINE, y-CHATBOX_HEIGHT);
|
||||
mvwaddch(ctx->sidebar, y-CHATBOX_HEIGHT, 0, ACS_BTEE);
|
||||
|
||||
int num_peers = groupchats[self->num].num_peers;
|
||||
if (num_peers) {
|
||||
|
@ -127,7 +127,7 @@ static void prompt_onDraw(ToxWindow *self, Tox *m)
|
||||
|
||||
StatusBar *statusbar = (StatusBar *) self->stb;
|
||||
werase(statusbar->topline);
|
||||
mvwhline(statusbar->topline, 1, 0, '-', x2);
|
||||
mvwhline(statusbar->topline, 1, 0, ACS_HLINE, x2);
|
||||
wmove(statusbar->topline, 0, 0);
|
||||
|
||||
if (statusbar->is_online) {
|
||||
@ -163,7 +163,7 @@ static void prompt_onDraw(ToxWindow *self, Tox *m)
|
||||
}
|
||||
|
||||
wattron(statusbar->topline, A_BOLD);
|
||||
wprintw(statusbar->topline, " | %s |", statusbar->statusmsg);
|
||||
wprintw(statusbar->topline, " - %s", statusbar->statusmsg);
|
||||
wattroff(statusbar->topline, A_BOLD);
|
||||
|
||||
wprintw(statusbar->topline, "\n");
|
||||
|
Loading…
Reference in New Issue
Block a user