- if (!read_color(db, inst,
- "menu.hilite.textColor", &theme->menu_hilite_color))
- theme->menu_hilite_color = RrColorNew(inst, 0, 0, 0);
-
- if (read_mask(inst, "max.xbm", theme, &theme->max_mask)) {
- if (!read_mask(inst, "max_pressed.xbm", theme,
- &theme->max_pressed_mask)) {
- theme->max_pressed_mask = RrPixmapMaskCopy(theme->max_mask);
- }
- if (!read_mask(inst, "max_toggled.xbm", theme,
- &theme->max_toggled_mask)) {
- theme->max_toggled_mask =
- RrPixmapMaskCopy(theme->max_pressed_mask);
- }
- if (!read_mask(inst, "max_disabled.xbm", theme,
- &theme->max_disabled_mask)) {
- theme->max_disabled_mask = RrPixmapMaskCopy(theme->max_mask);
- }
- if (!read_mask(inst, "max_hover.xbm", theme, &theme->max_hover_mask)) {
- theme->max_hover_mask = RrPixmapMaskCopy(theme->max_mask);
- }
- } else {
- {
- char data[] = { 0x7f, 0x7f, 0x7f, 0x41, 0x41, 0x41, 0x7f };
- theme->max_mask = RrPixmapMaskNew(inst, 7, 7, data);
- }
- {
- char data[] = { 0x7c, 0x44, 0x47, 0x47, 0x7f, 0x1f, 0x1f };
- theme->max_toggled_mask = RrPixmapMaskNew(inst, 7, 7, data);
+ if (!FIND(color, L("menu","activedisabled","text","primary"),
+ &theme->menu_disabled_selected_color, NULL))
+ theme->menu_disabled_selected_color =
+ RrColorNew(inst,
+ theme->menu_disabled_color->r,
+ theme->menu_disabled_color->g,
+ theme->menu_disabled_color->b);
+ if (!FIND(color, L("menu","active","text","primary"),
+ &theme->menu_selected_color, NULL))
+ theme->menu_selected_color = RrColorNew(inst, 0, 0, 0);
+ if (!FIND(color, L("window","active","label","text","shadow","primary"),
+ &theme->title_focused_shadow_color,
+ &theme->title_focused_shadow_alpha))
+ {
+ theme->title_focused_shadow_color = RrColorNew(inst, 0, 0, 0);
+ theme->title_focused_shadow_alpha = 50;
+ }
+ if (!FIND(color, L("osd","text","shadow","primary"),
+ &theme->osd_shadow_color, &theme->osd_shadow_alpha))
+ {
+ theme->osd_shadow_color =
+ RrColorNew(inst, theme->title_focused_shadow_color->r,
+ theme->title_focused_shadow_color->g,
+ theme->title_focused_shadow_color->b);
+ theme->osd_shadow_alpha = theme->title_focused_shadow_alpha;
+ }
+ if (!FIND(color, L("window","inactive","label","text","shadow","primary"),
+ &theme->title_unfocused_shadow_color,
+ &theme->title_unfocused_shadow_alpha))
+ {
+ theme->title_unfocused_shadow_color = RrColorNew(inst, 0, 0, 0);
+ theme->title_unfocused_shadow_alpha = 50;
+ }
+ if (!FIND(color, L("menu","title","text","shadow","primary"),
+ &theme->menu_title_shadow_color,
+ &theme->menu_title_shadow_alpha))
+ {
+ theme->menu_title_shadow_color = RrColorNew(inst, 0, 0, 0);
+ theme->menu_title_shadow_alpha = 50;
+ }
+ if (!FIND(color, L("menu","inactive","shadow","primary"),
+ &theme->menu_text_normal_shadow_color,
+ &theme->menu_text_normal_shadow_alpha))
+ {
+ theme->menu_text_normal_shadow_color = RrColorNew(inst, 0, 0, 0);
+ theme->menu_text_normal_shadow_alpha = 50;
+ }
+ if (!FIND(color, L("menu","active","text","shadow","primary"),
+ &theme->menu_text_selected_shadow_color,
+ &theme->menu_text_selected_shadow_alpha))
+ {
+ theme->menu_text_selected_shadow_color = RrColorNew(inst, 0, 0, 0);
+ theme->menu_text_selected_shadow_alpha = 50;
+ }
+ if (!FIND(color, L("menu","disabled","shadow","primary"),
+ &theme->menu_text_disabled_shadow_color,
+ &theme->menu_text_disabled_shadow_alpha))
+ {
+ theme->menu_text_disabled_shadow_color =
+ RrColorNew(inst, theme->menu_text_normal_shadow_color->r,
+ theme->menu_text_normal_shadow_color->g,
+ theme->menu_text_normal_shadow_color->b);
+ theme->menu_text_disabled_shadow_alpha =
+ theme->menu_text_normal_shadow_alpha;
+ }
+ if (!FIND(color, L("menu","activedisabled","shadow","primary"),
+ &theme->menu_text_disabled_selected_shadow_color,
+ &theme->menu_text_disabled_selected_shadow_alpha))
+ {
+ theme->menu_text_disabled_selected_shadow_color =
+ RrColorNew(inst, theme->menu_text_disabled_shadow_color->r,
+ theme->menu_text_disabled_shadow_color->g,
+ theme->menu_text_disabled_shadow_color->b);
+ theme->menu_text_disabled_selected_shadow_alpha =
+ theme->menu_text_disabled_shadow_alpha;
+ }
+
+ /* load the image masks */
+
+ /* maximize button masks */
+ userdef = TRUE;
+ if (!read_mask(&ps, "max.xbm", &theme->max_mask)) {
+ guchar data[] = { 0x3f, 0x3f, 0x21, 0x21, 0x21, 0x3f };
+ theme->max_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
+ userdef = FALSE;
+ }
+ if (!read_mask(&ps, "max_toggled.xbm", &theme->max_toggled_mask)) {
+ if (userdef)
+ theme->max_toggled_mask = RrPixmapMaskCopy(theme->max_mask);
+ else {
+ guchar data[] = { 0x3e, 0x22, 0x2f, 0x29, 0x39, 0x0f };
+ theme->max_toggled_mask = RrPixmapMaskNew(inst, 6, 6,(gchar*)data);