]> git.mdlowis.com Git - proto/labwc.git/commitdiff
theme: add window_active_handle_bg_color
authorJohan Malm <jgm323@gmail.com>
Fri, 12 Jun 2020 20:41:30 +0000 (21:41 +0100)
committerJohan Malm <jgm323@gmail.com>
Fri, 12 Jun 2020 20:41:30 +0000 (21:41 +0100)
data/themerc
include/theme.h
src/output.c
src/theme/theme.c

index a413a14aa27408f43dc1ea972c2117d5f5074c09..c698a50da55ce58dce7ebe6463cd35f413ee1fd9 100644 (file)
@@ -1 +1,4 @@
 window.active.title.bg.color: #589bda
+window.active.handle.bg.color: #3c7cb7
+
+window.inactive.title.bg.color: #efece6
index a6b5d125ccbe5cf421f0c037b2702f3a89928f79..ed39a092771a79d63121fe472e9f5a49357657f3 100644 (file)
@@ -5,6 +5,8 @@
 
 struct theme {
        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;
index eec3ce08b11295207d5de5681034eeeac8086069..35197dcd44b16f172c9fdbeb748a88a741873175 100644 (file)
@@ -2,8 +2,6 @@
 #include "rcxml.h"
 #include "theme.h"
 
-static float window_active_handle_bg[] = { 0.21, 0.49, 0.71, 1.0 };
-
 struct draw_data {
        struct wlr_renderer *renderer;
        float *transform_matrix;
@@ -48,7 +46,7 @@ static void render_decorations(struct wlr_output *output, struct view *view)
                .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_RIGHT));
        draw_rect(&ddata, deco_box(view, LAB_DECO_PART_BOTTOM));
index 868450e30eb074ee29a6ebf47cf7f0840fb41cb8..f9951e85b12fe8fa049a5624b9f8caeb21016449 100644 (file)
@@ -36,6 +36,10 @@ static void entry(const char *key, const char *value)
                return;
        if (!strcmp(key, "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)