X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=render%2Ftheme.c;h=313f834c51653990f9f20688459118e213075392;hb=0a5ac0c8ef4d921e7774caeddf853ddfd3ef1131;hp=3e0f9d13d3cb9f49388212a422fc52c42f6413e1;hpb=439d2c62fa83e4a233ea44f3eb5d706c6edfc3df;p=chaz%2Fopenbox diff --git a/render/theme.c b/render/theme.c index 3e0f9d13..313f834c 100644 --- a/render/theme.c +++ b/render/theme.c @@ -225,7 +225,8 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, if (!FIND(color, L("window","active","titleseparator"), &theme->title_separator_focused_color, NULL)) theme->title_separator_focused_color = - RrColorNew(inst, theme->frame_focused_border_color->r, + RrColorNew(inst, + theme->frame_focused_border_color->r, theme->frame_focused_border_color->g, theme->frame_focused_border_color->b); /* frame unfocused border color inherits from frame focused border color */ @@ -240,7 +241,8 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, if (!FIND(color, L("window","inactive","titleseparator"), &theme->title_separator_unfocused_color, NULL)) theme->title_separator_unfocused_color = - RrColorNew(inst, theme->frame_unfocused_border_color->r, + RrColorNew(inst, + theme->frame_unfocused_border_color->r, theme->frame_unfocused_border_color->g, theme->frame_unfocused_border_color->b); @@ -1218,6 +1220,8 @@ void RrThemeFree(RrTheme *theme) RrColorFree(theme->menu_border_color); RrColorFree(theme->frame_focused_border_color); RrColorFree(theme->frame_unfocused_border_color); + RrColorFree(theme->title_separator_focused_color); + RrColorFree(theme->title_separator_unfocused_color); RrColorFree(theme->cb_unfocused_color); RrColorFree(theme->cb_focused_color); RrColorFree(theme->title_focused_color); @@ -1468,30 +1472,33 @@ static void parse_style(gchar *tex, RrSurfaceColorType *grad, } else { *grad = RR_SURFACE_SOLID; } + } - if (strstr(tex, "sunken") != NULL) - *relief = RR_RELIEF_SUNKEN; - else if (strstr(tex, "flat") != NULL) - *relief = RR_RELIEF_FLAT; - else - *relief = RR_RELIEF_RAISED; - - *border = FALSE; - if (*relief == RR_RELIEF_FLAT) { - if (strstr(tex, "border") != NULL) - *border = TRUE; - } else { - if (strstr(tex, "bevel2") != NULL) - *bevel = RR_BEVEL_2; - else - *bevel = RR_BEVEL_1; - } + if (strstr(tex, "sunken") != NULL) + *relief = RR_RELIEF_SUNKEN; + else if (strstr(tex, "flat") != NULL) + *relief = RR_RELIEF_FLAT; + else if (strstr(tex, "raised") != NULL) + *relief = RR_RELIEF_RAISED; + else + *relief = (*grad == RR_SURFACE_PARENTREL) ? + RR_RELIEF_FLAT : RR_RELIEF_RAISED; - if (strstr(tex, "interlaced") != NULL) - *interlaced = TRUE; + *border = FALSE; + if (*relief == RR_RELIEF_FLAT) { + if (strstr(tex, "border") != NULL) + *border = TRUE; + } else { + if (strstr(tex, "bevel2") != NULL) + *bevel = RR_BEVEL_2; else - *interlaced = FALSE; + *bevel = RR_BEVEL_1; } + + if (strstr(tex, "interlaced") != NULL) + *interlaced = TRUE; + else + *interlaced = FALSE; } static xmlNodePtr find_node(xmlNodePtr n, const gchar *names[])