about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-02-21 19:11:36 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-02-21 19:12:16 +0100
commit6dbbbe11e50d9978334df207386478759cf48491 (patch)
tree38d9f2978e37865af1eb8ef9ec33f81ff3bba67c
parenteb2fbdba2efb9c81275461bf3651215b9456e496 (diff)
downloadprofani-tty-6dbbbe11e50d9978334df207386478759cf48491.tar.gz
Make trackbar color configurable
Use `main.trackbar` in themes.
-rw-r--r--src/config/theme.c1
-rw-r--r--src/config/theme.h1
-rw-r--r--src/ui/window.c6
-rw-r--r--theme_template1
4 files changed, 9 insertions, 0 deletions
diff --git a/src/config/theme.c b/src/config/theme.c
index 64c276e9..9c21fb6a 100644
--- a/src/config/theme.c
+++ b/src/config/theme.c
@@ -722,6 +722,7 @@ theme_attrs(theme_item_t attrs)
     case THEME_TEXT_ME:                 _theme_prep_fgnd("main.text.me",            lookup_str, &bold); break;
     case THEME_TEXT_THEM:               _theme_prep_fgnd("main.text.them",          lookup_str, &bold); break;
     case THEME_SPLASH:                  _theme_prep_fgnd("main.splash",             lookup_str, &bold); break;
+    case THEME_TRACKBAR:                _theme_prep_fgnd("main.trackbar",           lookup_str, &bold); break;
     case THEME_HELP_HEADER:             _theme_prep_fgnd("main.help.header",        lookup_str, &bold); break;
     case THEME_ERROR:                   _theme_prep_fgnd("error",                   lookup_str, &bold); break;
     case THEME_INCOMING:                _theme_prep_fgnd("incoming",                lookup_str, &bold); break;
diff --git a/src/config/theme.h b/src/config/theme.h
index 12b7616a..6a33d37a 100644
--- a/src/config/theme.h
+++ b/src/config/theme.h
@@ -139,6 +139,7 @@ typedef enum {
     THEME_MAGENTA_BOLD,
     THEME_TEXT_HISTORY,
     THEME_CMD_WINS_UNREAD,
+    THEME_TRACKBAR,
 } theme_item_t;
 
 void theme_init(const char *const theme_name);
diff --git a/src/ui/window.c b/src/ui/window.c
index d44795d5..9c508e2a 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -1698,10 +1698,16 @@ win_print_separator(ProfWin *window)
 {
     int cols = getmaxx(window->layout->win);
 
+    wbkgdset(window->layout->win, theme_attrs(THEME_TRACKBAR));
+    wattron(window->layout->win, theme_attrs(THEME_TRACKBAR));
+
     int i;
     for (i=1; i<cols; i++) {
         wprintw(window->layout->win, "-");
     }
+
+    wattroff(window->layout->win, theme_attrs(THEME_TRACKBAR));
+
     wprintw(window->layout->win, "\n");
 }
 
diff --git a/theme_template b/theme_template
index 3a512936..e3644c97 100644
--- a/theme_template
+++ b/theme_template
@@ -26,6 +26,7 @@ main.text.them=
 main.text.history=
 main.splash=
 main.time=
+main.trackbar=
 input.text=
 subscribed=
 unsubscribed=