mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-16 04:03:02 +01:00
a few UI changes
This commit is contained in:
parent
3a176e1cab
commit
2e65ee3609
@ -1023,7 +1023,7 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (statusbar->statusmsg[0])
|
if (statusbar->statusmsg[0])
|
||||||
wprintw(statusbar->topline, "- %s ", statusbar->statusmsg);
|
wprintw(statusbar->topline, ": %s ", statusbar->statusmsg);
|
||||||
|
|
||||||
wclrtoeol(statusbar->topline);
|
wclrtoeol(statusbar->topline);
|
||||||
wmove(statusbar->topline, 0, x2 - (KEY_IDENT_DIGITS * 2) - 3);
|
wmove(statusbar->topline, 0, x2 - (KEY_IDENT_DIGITS * 2) - 3);
|
||||||
|
@ -307,7 +307,7 @@ static void groupchat_onGroupNamelistChange(ToxWindow *self, Tox *m, int groupnu
|
|||||||
|
|
||||||
case TOX_CHAT_CHANGE_PEER_DEL:
|
case TOX_CHAT_CHANGE_PEER_DEL:
|
||||||
event = "has left the room";
|
event = "has left the room";
|
||||||
line_info_add(self, timefrmt, (char *) oldpeername, NULL, CONNECTION, 0, 0, event);
|
line_info_add(self, timefrmt, (char *) oldpeername, NULL, CONNECTION, 0, RED, event);
|
||||||
|
|
||||||
if (groupchats[self->num].side_pos > 0)
|
if (groupchats[self->num].side_pos > 0)
|
||||||
--groupchats[self->num].side_pos;
|
--groupchats[self->num].side_pos;
|
||||||
|
@ -165,12 +165,16 @@ void line_info_add(ToxWindow *self, char *timestr, char *name1, char *name2, uin
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CONNECTION:
|
case CONNECTION:
|
||||||
len += 3;
|
len += 5;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SYS_MSG:
|
case SYS_MSG:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NAME_CHANGE:
|
||||||
|
len += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
case PROMPT:
|
case PROMPT:
|
||||||
++len;
|
++len;
|
||||||
break;
|
break;
|
||||||
@ -395,9 +399,12 @@ void line_info_print(ToxWindow *self)
|
|||||||
wattroff(win, COLOR_PAIR(BLUE));
|
wattroff(win, COLOR_PAIR(BLUE));
|
||||||
|
|
||||||
wattron(win, COLOR_PAIR(line->colour));
|
wattron(win, COLOR_PAIR(line->colour));
|
||||||
|
wprintw(win, "%s ", line->colour == RED ? "<--" : "-->");
|
||||||
|
|
||||||
wattron(win, A_BOLD);
|
wattron(win, A_BOLD);
|
||||||
wprintw(win, "* %s ", line->name1);
|
wprintw(win, "%s ", line->name1);
|
||||||
wattroff(win, A_BOLD);
|
wattroff(win, A_BOLD);
|
||||||
|
|
||||||
wprintw(win, "%s\n", line->msg);
|
wprintw(win, "%s\n", line->msg);
|
||||||
wattroff(win, COLOR_PAIR(line->colour));
|
wattroff(win, COLOR_PAIR(line->colour));
|
||||||
|
|
||||||
@ -409,8 +416,9 @@ void line_info_print(ToxWindow *self)
|
|||||||
wattroff(win, COLOR_PAIR(BLUE));
|
wattroff(win, COLOR_PAIR(BLUE));
|
||||||
|
|
||||||
wattron(win, COLOR_PAIR(MAGENTA));
|
wattron(win, COLOR_PAIR(MAGENTA));
|
||||||
|
wprintw(win, "-!- ");
|
||||||
wattron(win, A_BOLD);
|
wattron(win, A_BOLD);
|
||||||
wprintw(win, "* %s", line->name1);
|
wprintw(win, "%s", line->name1);
|
||||||
wattroff(win, A_BOLD);
|
wattroff(win, A_BOLD);
|
||||||
|
|
||||||
wprintw(win, "%s", line->msg);
|
wprintw(win, "%s", line->msg);
|
||||||
|
@ -87,7 +87,7 @@ void get_time_str(char *buf, int bufsize)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *t = user_settings->time == TIME_12 ? "[%-I:%M:%S] " : "[%H:%M:%S] ";
|
const char *t = user_settings->time == TIME_12 ? "%-I:%M:%S " : "%H:%M:%S ";
|
||||||
strftime(buf, bufsize, t, get_time());
|
strftime(buf, bufsize, t, get_time());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ static void prompt_onDraw(ToxWindow *self, Tox *m)
|
|||||||
} else {
|
} else {
|
||||||
wprintw(statusbar->topline, " [Offline]");
|
wprintw(statusbar->topline, " [Offline]");
|
||||||
wattron(statusbar->topline, A_BOLD);
|
wattron(statusbar->topline, A_BOLD);
|
||||||
wprintw(statusbar->topline, " %s ", statusbar->nick);
|
wprintw(statusbar->topline, " %s", statusbar->nick);
|
||||||
wattroff(statusbar->topline, A_BOLD);
|
wattroff(statusbar->topline, A_BOLD);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ static void prompt_onDraw(ToxWindow *self, Tox *m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (statusbar->statusmsg[0])
|
if (statusbar->statusmsg[0])
|
||||||
wprintw(statusbar->topline, " - %s", statusbar->statusmsg);
|
wprintw(statusbar->topline, " : %s", statusbar->statusmsg);
|
||||||
|
|
||||||
mvwhline(self->window, y2 - CHATBOX_HEIGHT, 0, ACS_HLINE, x2);
|
mvwhline(self->window, y2 - CHATBOX_HEIGHT, 0, ACS_HLINE, x2);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user