X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=render%2Ftheme.c;h=c87f58c2f6ebe23b39ccdaa1f3e012ff4c899678;hb=02045b14d62bca513bd81d11ca1ae8623edda105;hp=6e097bd618aa699f5a35d95e2cf603125a272d7e;hpb=735776321cb25a04eb4f0dff988be524a1c30a1e;p=chaz%2Fopenbox diff --git a/render/theme.c b/render/theme.c index 6e097bd6..c87f58c2 100644 --- a/render/theme.c +++ b/render/theme.c @@ -35,6 +35,8 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) theme->inst = inst; + theme->show_handle = TRUE; + theme->a_disabled_focused_max = RrAppearanceNew(inst, 1); theme->a_disabled_unfocused_max = RrAppearanceNew(inst, 1); theme->a_hover_focused_max = RrAppearanceNew(inst, 1); @@ -146,14 +148,19 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) /* 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->menu_overlap = 0; + if (!read_int(db, "handleWidth", &theme->handle_height)) + theme->handle_height = 6; + if (!theme->handle_height) + theme->show_handle = FALSE; + if (theme->handle_height <= 0 || theme->handle_height > 100) theme->handle_height = 6; if (!read_int(db, "bevelWidth", &theme->bevel) || - theme->bevel <= 0 || theme->bevel > 100) theme->bevel = 3; + theme->bevel <= 0 || theme->bevel > 100) + theme->bevel = 3; if (!read_int(db, "borderWidth", &theme->bwidth) || - theme->bwidth < 0 || theme->bwidth > 100) theme->bwidth = 1; + theme->bwidth < 0 || theme->bwidth > 100) + theme->bwidth = 1; if (!read_int(db, "frameWidth", &theme->cbwidth) || theme->cbwidth < 0 || theme->cbwidth > 100) theme->cbwidth = theme->bevel;