X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=render%2Ftheme.c;h=b1b15ff249c08496890332e885014c556cb6e172;hb=8186a81fe0095a46c2a65e252268f19d5798095a;hp=3d357e385703b4c53a5c5df45c4b3e5f95dec3ba;hpb=fe08a60665dfa6de0ce7c7c0eaf47e69e6a0f23e;p=chaz%2Fopenbox diff --git a/render/theme.c b/render/theme.c index 3d357e38..b1b15ff2 100644 --- a/render/theme.c +++ b/render/theme.c @@ -177,9 +177,14 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, theme->osd_font = RrFontOpenDefault(inst); /* load direct dimensions */ - if (!read_int(db, "menu.overlap", &theme->menu_overlap) || - theme->menu_overlap < -100 || theme->menu_overlap > 100) - theme->menu_overlap = 0; + if ((!read_int(db, "menu.overlap.x", &theme->menu_overlap_x) && + !read_int(db, "menu.overlap", &theme->menu_overlap_x)) || + theme->menu_overlap_x < -100 || theme->menu_overlap_x > 100) + theme->menu_overlap_x = 0; + if ((!read_int(db, "menu.overlap.y", &theme->menu_overlap_y) && + !read_int(db, "menu.overlap", &theme->menu_overlap_y)) || + theme->menu_overlap_y < -100 || theme->menu_overlap_y > 100) + theme->menu_overlap_y = 0; if (!read_int(db, "window.handle.width", &theme->handle_height) || theme->handle_height < 0 || theme->handle_height > 100) theme->handle_height = 6; @@ -897,13 +902,9 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, j = (i > 0 ? 0 : 255); i = ABS(i*255/100); - theme->title_focused_shadow_color = RrColorNew(inst, j, j, j); - theme->title_focused_shadow_alpha = i; theme->osd_shadow_color = RrColorNew(inst, j, j, j); theme->osd_shadow_alpha = i; } else { - theme->title_focused_shadow_color = RrColorNew(inst, 0, 0, 0); - theme->title_focused_shadow_alpha = 50; theme->osd_shadow_color = RrColorNew(inst, 0, 0, 0); theme->osd_shadow_alpha = 50; } @@ -1455,6 +1456,7 @@ void RrThemeFree(RrTheme *theme) RrFontClose(theme->win_font_unfocused); RrFontClose(theme->menu_title_font); RrFontClose(theme->menu_font); + RrFontClose(theme->osd_font); RrAppearanceFree(theme->a_disabled_focused_max); RrAppearanceFree(theme->a_disabled_unfocused_max);