X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=render%2Ftheme.c;h=4fc3d6a1b758b7820e384ceeebd76956c46147eb;hb=d51702affa3e3895f9fca218de39690f8958b500;hp=877d2f1270043bb40ad758ad629720399b09e973;hpb=81af5a8b0caadc0a82ff2304c315f816c9576e93;p=chaz%2Fopenbox diff --git a/render/theme.c b/render/theme.c index 877d2f12..4fc3d6a1 100644 --- a/render/theme.c +++ b/render/theme.c @@ -63,8 +63,9 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) if (name) { db = loaddb(theme, name); if (db == NULL) { - g_warning("Failed to load the theme '%s'", name); - g_message("Falling back to the default: '%s'", DEFAULT_THEME); + g_warning("Failed to load the theme '%s'\n" + "Falling back to the default: '%s'", + name, DEFAULT_THEME); } else theme->name = g_path_get_basename(name); } @@ -135,6 +136,9 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) theme->title_layout = g_strdup(font_str); /* load direct dimensions */ + if (!read_int(db, "menuOverlap", &theme->menu_overlap) || + theme->menu_overlap < 0 || theme->menu_overlap > 20) + theme->handle_height = 0; if (!read_int(db, "handleWidth", &theme->handle_height) || theme->handle_height < 0 || theme->handle_height > 100) theme->handle_height = 6; @@ -164,6 +168,14 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) "window.label.unfocus.textColor", &theme->title_unfocused_color)) theme->title_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff); + if (!read_color(db, inst, + "window.button.focus.picColor", + &theme->titlebut_focused_color)) + theme->titlebut_focused_color = RrColorNew(inst, 0, 0, 0); + if (!read_color(db, inst, + "window.button.unfocus.picColor", + &theme->titlebut_unfocused_color)) + theme->titlebut_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff); if (!read_color(db, inst, "window.button.disabled.focus.picColor", &theme->titlebut_disabled_focused_color)) @@ -173,14 +185,6 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) "window.button.disabled.unfocus.picColor", &theme->titlebut_disabled_unfocused_color)) theme->titlebut_disabled_unfocused_color = RrColorNew(inst, 0, 0, 0); - if (!read_color(db, inst, - "window.button.focus.picColor", - &theme->titlebut_focused_color)) - theme->titlebut_focused_color = RrColorNew(inst, 0, 0, 0); - if (!read_color(db, inst, - "window.button.unfocus.picColor", - &theme->titlebut_unfocused_color)) - theme->titlebut_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff); if (!read_color(db, inst, "menu.title.textColor", &theme->menu_title_color)) theme->menu_title_color = RrColorNew(inst, 0, 0, 0);