diff options
author | Lukasz Marcinowski <lukasz.marcinowski@nokia.com> | 2017-02-15 14:34:57 +0100 |
---|---|---|
committer | Lukasz Marcinowski <lukasz.marcinowski@gmail.com> | 2017-03-22 19:56:00 +0100 |
commit | 91bc302acfebea5aec70513401fec2b5d0f57a87 (patch) | |
tree | 146286502166ce8d4c30bed162f6251148544f6c /src/ui | |
parent | f1a5d12950301d762c3a2465c768676730229eab (diff) | |
download | profani-tty-91bc302acfebea5aec70513401fec2b5d0f57a87.tar.gz |
Add theme option for time in a status bar
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/console.c | 1 | ||||
-rw-r--r-- | src/ui/statusbar.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/console.c b/src/ui/console.c index 64f44c52..4c24b450 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -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"); diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c index d19b5618..7998d7b4 100644 --- a/src/ui/statusbar.c +++ b/src/ui/statusbar.c @@ -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); |