theme: add window_active_handle_bg_color

This commit is contained in:
Johan Malm 2020-06-12 21:41:30 +01:00
parent d40445da1d
commit c7a179f5b3
4 changed files with 10 additions and 3 deletions

View file

@ -1 +1,4 @@
window.active.title.bg.color: #589bda window.active.title.bg.color: #589bda
window.active.handle.bg.color: #3c7cb7
window.inactive.title.bg.color: #efece6

View file

@ -5,6 +5,8 @@
struct theme { struct theme {
float window_active_title_bg_color[4]; float window_active_title_bg_color[4];
float window_active_handle_bg_color[4];
float window_inactive_title_bg_color[4];
}; };
extern struct theme theme; extern struct theme theme;

View file

@ -2,8 +2,6 @@
#include "rcxml.h" #include "rcxml.h"
#include "theme.h" #include "theme.h"
static float window_active_handle_bg[] = { 0.21, 0.49, 0.71, 1.0 };
struct draw_data { struct draw_data {
struct wlr_renderer *renderer; struct wlr_renderer *renderer;
float *transform_matrix; float *transform_matrix;
@ -48,7 +46,7 @@ static void render_decorations(struct wlr_output *output, struct view *view)
.transform_matrix = output->transform_matrix, .transform_matrix = output->transform_matrix,
}; };
ddata.rgba = window_active_handle_bg; ddata.rgba = theme.window_active_handle_bg_color;
draw_rect(&ddata, deco_box(view, LAB_DECO_PART_TOP)); draw_rect(&ddata, deco_box(view, LAB_DECO_PART_TOP));
draw_rect(&ddata, deco_box(view, LAB_DECO_PART_RIGHT)); draw_rect(&ddata, deco_box(view, LAB_DECO_PART_RIGHT));
draw_rect(&ddata, deco_box(view, LAB_DECO_PART_BOTTOM)); draw_rect(&ddata, deco_box(view, LAB_DECO_PART_BOTTOM));

View file

@ -36,6 +36,10 @@ static void entry(const char *key, const char *value)
return; return;
if (!strcmp(key, "window.active.title.bg.color")) if (!strcmp(key, "window.active.title.bg.color"))
parse_hexstr(value, theme.window_active_title_bg_color); parse_hexstr(value, theme.window_active_title_bg_color);
if (!strcmp(key, "window.active.handle.bg.color"))
parse_hexstr(value, theme.window_active_handle_bg_color);
if (!strcmp(key, "window.inactive.title.bg.color"))
parse_hexstr(value, theme.window_inactive_title_bg_color);
} }
static void rtrim(char **s) static void rtrim(char **s)