summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-02-22 12:31:26 -0500
committerDana Jansens <danakj@orodu.net>2008-02-22 12:31:26 -0500
commit97de73776708d7c75b42c8fcf33342541d721c83 (patch)
treeffeaae16ca8c9e248062cb04a3266964735c4488 /render
parent198d98986bdf224ed29361541d19841339953088 (diff)
parentd9e6aa5643e74ab84fde0ddb1fcb8418ff212281 (diff)
Merge branch 'backport' into work
Conflicts: openbox/menuframe.c openbox/prompt.c openbox/prop.c openbox/prop.h
Diffstat (limited to 'render')
-rw-r--r--render/theme.c18
-rw-r--r--render/theme.h4
2 files changed, 22 insertions, 0 deletions
diff --git a/render/theme.c b/render/theme.c
index 1dad8e4c..ece4037c 100644
--- a/render/theme.c
+++ b/render/theme.c
@@ -211,6 +211,17 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
if (!read_int(db, "window.client.padding.height", &theme->cbwidthy) ||
theme->cbwidthy < 0 || theme->cbwidthy > 100)
theme->cbwidthy = theme->cbwidthx;
+ if (!read_int(db, "menu.separator.width", &theme->menu_sep_width) ||
+ theme->menu_sep_width < 1 || theme->menu_sep_width > 100)
+ theme->menu_sep_width = 1;
+ if (!read_int(db, "menu.separator.padding.width",
+ &theme->menu_sep_paddingx) ||
+ theme->menu_sep_paddingx < 0 || theme->menu_sep_paddingx > 100)
+ theme->menu_sep_paddingx = 6;
+ if (!read_int(db, "menu.separator.padding.height",
+ &theme->menu_sep_paddingy) ||
+ theme->menu_sep_paddingy < 0 || theme->menu_sep_paddingy > 100)
+ theme->menu_sep_paddingy = 3;
/* load colors */
if (!read_color(db, inst,
@@ -408,6 +419,12 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
"menu.items.active.text.color",
&theme->menu_selected_color))
theme->menu_selected_color = RrColorNew(inst, 0, 0, 0);
+ if (!read_color(db, inst,
+ "menu.separator.color", &theme->menu_sep_color))
+ theme->menu_sep_color = RrColorNew(inst,
+ theme->menu_color->r,
+ theme->menu_color->g,
+ theme->menu_color->b);
/* load the image masks */
@@ -1418,6 +1435,7 @@ void RrThemeFree(RrTheme *theme)
RrColorFree(theme->titlebut_focused_unpressed_color);
RrColorFree(theme->titlebut_unfocused_unpressed_color);
RrColorFree(theme->menu_title_color);
+ RrColorFree(theme->menu_sep_color);
RrColorFree(theme->menu_color);
RrColorFree(theme->menu_selected_color);
RrColorFree(theme->menu_disabled_color);
diff --git a/render/theme.h b/render/theme.h
index 9b2d663e..da8e80d3 100644
--- a/render/theme.h
+++ b/render/theme.h
@@ -47,6 +47,9 @@ struct _RrTheme {
gint cbwidthy;
gint menu_overlap_x;
gint menu_overlap_y;
+ gint menu_sep_width;
+ gint menu_sep_paddingx;
+ gint menu_sep_paddingy;
/* these ones are calculated, not set directly by the theme file */
gint win_font_height;
gint menu_title_font_height;
@@ -84,6 +87,7 @@ struct _RrTheme {
RrColor *titlebut_focused_unpressed_color;
RrColor *titlebut_unfocused_unpressed_color;
RrColor *menu_title_color;
+ RrColor *menu_sep_color;
RrColor *menu_color;
RrColor *menu_selected_color;
RrColor *menu_disabled_color;