Skip to content

Commit

Permalink
make edit hints and typing notifications lighter
Browse files Browse the repository at this point in the history
  • Loading branch information
tsudoko committed Mar 6, 2015
1 parent d785939 commit de12b2c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void edit_draw(EDIT *edit, int x, int y, int width, int height)
// TODO: what is this for?
if(!edit->length && maybe_i18nal_string_is_valid(&edit->empty_str)) {
STRING* empty_str_text = maybe_i18nal_string_get(&edit->empty_str);
setcolor(COLOR_MAIN_TEXT);
setcolor(COLOR_MAIN_HINTTEXT);
drawtext(x + 2 * SCALE, yy + 2 * SCALE, empty_str_text->str, empty_str_text->length);
}

Expand Down
10 changes: 3 additions & 7 deletions messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void messages_draw(MESSAGES *m, int x, int y, int width, int height)
// Draw the names for groups or friends
if(m->type) {
// Group message authors are all the same colour
setcolor(COLOR_MAIN_TEXT);
setcolor(COLOR_MAIN_CHATTEXT);
setfont(FONT_TEXT);
drawtextwidth_right(x, MESSAGES_X - NAME_OFFSET, y, &msg->msg[msg->length] + 1, msg->msg[msg->length]);
} else {
Expand Down Expand Up @@ -137,11 +137,7 @@ void messages_draw(MESSAGES *m, int x, int y, int width, int height)
h2 = STRING_IDX_MAX;
}

if(msg->author) {
setcolor(COLOR_MAIN_SUBTEXT);
} else {
setcolor(COLOR_MAIN_TEXT);
}
setcolor(COLOR_MAIN_CHATTEXT);

if (msg->msg_type == MSG_TYPE_ACTION_TEXT) {
setcolor(COLOR_MAIN_ACTIONTEXT);
Expand Down Expand Up @@ -260,7 +256,7 @@ void messages_draw(MESSAGES *m, int x, int y, int width, int height)
FRIEND *f = get_typers(m);
if(f) {
setfont(FONT_TEXT);
setcolor(COLOR_MAIN_TEXT);
setcolor(COLOR_MAIN_HINTTEXT);
drawtextwidth_right(x, MESSAGES_X - NAME_OFFSET, y, f->name, f->name_length);
drawtextwidth(x + MESSAGES_X, x + width, y, S(IS_TYPING), SLEN(IS_TYPING));
}
Expand Down
5 changes: 5 additions & 0 deletions theme.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ void theme_load(char loadtheme)
//---- Main chat area ----
COLOR_MAIN_BACKGROUND = COLOR_PROC(0xFFFFFF);
COLOR_MAIN_TEXT = COLOR_PROC(0x333333);
COLOR_MAIN_CHATTEXT = COLOR_PROC(0x000000);
COLOR_MAIN_SUBTEXT = COLOR_PROC(0x414141);
COLOR_MAIN_ACTIONTEXT = COLOR_PROC(0x4e4ec8);
COLOR_MAIN_QUOTETEXT = COLOR_PROC(0x008000);
COLOR_MAIN_URLTEXT = COLOR_PROC(0x0000ff);
COLOR_MAIN_HINTTEXT = COLOR_PROC(0x969696);

//---- Top & bottom menu colours ----
COLOR_MENU_BACKGROUND = COLOR_PROC(0x1c1c1c);
Expand Down Expand Up @@ -66,6 +68,7 @@ void theme_load(char loadtheme)
case THEME_DARK:
COLOR_MAIN_BACKGROUND = COLOR_PROC(0x333333);
COLOR_MAIN_TEXT = COLOR_PROC(0xdfdfdf);
COLOR_MAIN_CHATTEXT = COLOR_PROC(0xFFFFFF);
COLOR_MAIN_SUBTEXT = COLOR_PROC(0xbbbbbb);
COLOR_MAIN_ACTIONTEXT = COLOR_PROC(0x27a9bc);
COLOR_MAIN_URLTEXT = COLOR_MAIN_ACTIONTEXT;
Expand Down Expand Up @@ -121,10 +124,12 @@ void theme_load(char loadtheme)

COLOR_MAIN_BACKGROUND = COLOR_PROC(0xFFFFFF);
COLOR_MAIN_TEXT = COLOR_PROC(0x000001);
COLOR_MAIN_CHATTEXT = COLOR_MAIN_TEXT;
COLOR_MAIN_SUBTEXT = COLOR_MAIN_TEXT;
COLOR_MAIN_ACTIONTEXT = COLOR_PROC(0x000033);
COLOR_MAIN_QUOTETEXT = COLOR_PROC(0x003300);
COLOR_MAIN_URLTEXT = COLOR_MAIN_ACTIONTEXT;
COLOR_MAIN_HINTTEXT = COLOR_MAIN_TEXT;
COLOR_MENU_BACKGROUND = COLOR_MAIN_BACKGROUND;
COLOR_MENU_TEXT = COLOR_MAIN_TEXT;
COLOR_MENU_HOVER_BACKGROUND = COLOR_MAIN_BACKGROUND;
Expand Down
2 changes: 2 additions & 0 deletions theme.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ enum {

uint32_t COLOR_MAIN_BACKGROUND;
uint32_t COLOR_MAIN_TEXT;
uint32_t COLOR_MAIN_CHATTEXT;
uint32_t COLOR_MAIN_SUBTEXT;
uint32_t COLOR_MAIN_ACTIONTEXT;
uint32_t COLOR_MAIN_QUOTETEXT;
uint32_t COLOR_MAIN_URLTEXT;
uint32_t COLOR_MAIN_HINTTEXT;
uint32_t COLOR_MENU_BACKGROUND;
uint32_t COLOR_MENU_TEXT;
uint32_t COLOR_MENU_HOVER_BACKGROUND;
Expand Down

0 comments on commit de12b2c

Please sign in to comment.