mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Merge remote-tracking branch 'edoiks/upstream'
This commit is contained in:
commit
b19e02db91
@ -104,6 +104,7 @@ theme_init(const char *const theme_name)
|
||||
g_hash_table_insert(defaults, strdup("statusbar.brackets"), strdup("cyan"));
|
||||
g_hash_table_insert(defaults, strdup("statusbar.active"), strdup("cyan"));
|
||||
g_hash_table_insert(defaults, strdup("statusbar.new"), strdup("white"));
|
||||
g_hash_table_insert(defaults, strdup("statusbar.time"), strdup("white"));
|
||||
g_hash_table_insert(defaults, strdup("me"), strdup("yellow"));
|
||||
g_hash_table_insert(defaults, strdup("them"), strdup("green"));
|
||||
g_hash_table_insert(defaults, strdup("receipt.sent"), strdup("red"));
|
||||
@ -755,6 +756,7 @@ theme_attrs(theme_item_t attrs)
|
||||
case THEME_STATUS_BRACKET: _theme_prep_fgnd("statusbar.brackets", lookup_str, &bold); break;
|
||||
case THEME_STATUS_ACTIVE: _theme_prep_fgnd("statusbar.active", lookup_str, &bold); break;
|
||||
case THEME_STATUS_NEW: _theme_prep_fgnd("statusbar.new", lookup_str, &bold); break;
|
||||
case THEME_STATUS_TIME: _theme_prep_fgnd("statusbar.time", lookup_str, &bold); break;
|
||||
case THEME_ME: _theme_prep_fgnd("me", lookup_str, &bold); break;
|
||||
case THEME_THEM: _theme_prep_fgnd("them", lookup_str, &bold); break;
|
||||
case THEME_RECEIPT_SENT: _theme_prep_fgnd("receipt.sent", lookup_str, &bold); break;
|
||||
@ -843,6 +845,7 @@ theme_attrs(theme_item_t attrs)
|
||||
case THEME_STATUS_BRACKET:
|
||||
case THEME_STATUS_ACTIVE:
|
||||
case THEME_STATUS_NEW:
|
||||
case THEME_STATUS_TIME:
|
||||
_theme_prep_bgnd("statusbar", "blue", lookup_str);
|
||||
break;
|
||||
default:
|
||||
|
@ -69,6 +69,7 @@ typedef enum {
|
||||
THEME_STATUS_BRACKET,
|
||||
THEME_STATUS_ACTIVE,
|
||||
THEME_STATUS_NEW,
|
||||
THEME_STATUS_TIME,
|
||||
THEME_ME,
|
||||
THEME_THEM,
|
||||
THEME_ROOMINFO,
|
||||
|
@ -2224,6 +2224,7 @@ cons_theme_properties(void)
|
||||
_cons_theme_bar_prop(THEME_STATUS_BRACKET, "statusbar.brackets");
|
||||
_cons_theme_bar_prop(THEME_STATUS_ACTIVE, "statusbar.active");
|
||||
_cons_theme_bar_prop(THEME_STATUS_NEW, "statusbar.new");
|
||||
_cons_theme_bar_prop(THEME_STATUS_TIME, "statusbar.time");
|
||||
|
||||
_cons_theme_prop(THEME_TIME, "main.time");
|
||||
_cons_theme_prop(THEME_TEXT, "main.text");
|
||||
|
@ -459,6 +459,7 @@ _status_bar_draw(void)
|
||||
last_time = g_date_time_new_now(tz);
|
||||
|
||||
int bracket_attrs = theme_attrs(THEME_STATUS_BRACKET);
|
||||
int time_attrs = theme_attrs(THEME_STATUS_TIME);
|
||||
|
||||
char *time_pref = prefs_get_string(PREF_TIME_STATUSBAR);
|
||||
if (g_strcmp0(time_pref, "off") != 0) {
|
||||
@ -468,7 +469,9 @@ _status_bar_draw(void)
|
||||
wattron(status_bar, bracket_attrs);
|
||||
mvwaddch(status_bar, 0, 1, '[');
|
||||
wattroff(status_bar, bracket_attrs);
|
||||
wattron(status_bar, time_attrs);
|
||||
mvwprintw(status_bar, 0, 2, date_fmt);
|
||||
wattroff(status_bar, time_attrs);
|
||||
wattron(status_bar, bracket_attrs);
|
||||
mvwaddch(status_bar, 0, 2 + len, ']');
|
||||
wattroff(status_bar, bracket_attrs);
|
||||
|
Loading…
Reference in New Issue
Block a user