]> Dogcows Code - chaz/openbox/blobdiff - render/theme.c
add a menuOverlap property to themes, and use it in the submenu placement
[chaz/openbox] / render / theme.c
index 877d2f1270043bb40ad758ad629720399b09e973..a7da009b01488af135a906e5d4c61236f1a27740 100644 (file)
@@ -135,6 +135,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 +167,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 +184,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);
This page took 0.022919 seconds and 4 git commands to generate.