- if (!read_color(db, inst,
- "borderColor", &theme->b_color))
- theme->b_color = RrColorNew(inst, 0, 0, 0);
- if (!read_color(db, inst,
- "window.frame.focusColor", &theme->cb_focused_color))
- theme->cb_focused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
- if (!read_color(db, inst,
- "window.frame.unfocusColor",&theme->cb_unfocused_color))
- theme->cb_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
- if (!read_color(db, inst,
- "window.label.focus.textColor",
- &theme->title_focused_color))
- theme->title_focused_color = RrColorNew(inst, 0x0, 0x0, 0x0);
- if (!read_color(db, inst,
- "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,
- "menu.title.textColor", &theme->menu_title_color))
+ if (!FIND(color, L("window","active","border"),
+ &theme->frame_focused_border_color, NULL))
+ theme->frame_focused_border_color = RrColorNew(inst, 0, 0, 0);
+ /* frame unfocused border color inherits from frame focused border color */
+ if (!FIND(color, L("window","inactive","border"),
+ &theme->frame_unfocused_border_color, NULL))
+ theme->frame_unfocused_border_color =
+ RrColorNew(inst,
+ theme->frame_focused_border_color->r,
+ theme->frame_focused_border_color->g,
+ theme->frame_focused_border_color->b);
+
+ /* menu border color inherits from frame focused border color */
+ if (!FIND(color, L("menu","border"),
+ &theme->menu_border_color, NULL))
+ theme->menu_border_color =
+ RrColorNew(inst,
+ theme->frame_focused_border_color->r,
+ theme->frame_focused_border_color->g,
+ theme->frame_focused_border_color->b);
+ if (!FIND(color, L("window","active","clientpadding"),
+ &theme->cb_focused_color, NULL))
+ theme->cb_focused_color = RrColorNew(inst, 255, 255, 255);
+ if (!FIND(color, L("window","inactive","clientpadding"),
+ &theme->cb_unfocused_color, NULL))
+ theme->cb_unfocused_color = RrColorNew(inst, 255, 255, 255);
+ if (!FIND(color, L("window","active","label","text","primary"),
+ &theme->title_focused_color, NULL))
+ theme->title_focused_color = RrColorNew(inst, 0x0, 0x0, 0x0);
+ if (!FIND(color, L("osd","text","primary"),
+ &theme->osd_color, NULL))
+ theme->osd_color = RrColorNew(inst,
+ theme->title_focused_color->r,
+ theme->title_focused_color->g,
+ theme->title_focused_color->b);
+ if (!FIND(color, L("window","inactive","label","text","primary"),
+ &theme->title_unfocused_color, NULL))
+ theme->title_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
+ if (!FIND(color, L("window","active","buttons","unpressed","image"),
+ &theme->titlebut_focused_unpressed_color, NULL))
+ theme->titlebut_focused_unpressed_color = RrColorNew(inst, 0, 0, 0);
+ if (!FIND(color, L("window","inactive","buttons", "unpressed","image"),
+ &theme->titlebut_unfocused_unpressed_color, NULL))
+ theme->titlebut_unfocused_unpressed_color =
+ RrColorNew(inst, 0xff, 0xff, 0xff);
+ if (!FIND(color, L("window","active","buttons","pressed","image"),
+ &theme->titlebut_focused_pressed_color, NULL))
+ theme->titlebut_focused_pressed_color =
+ RrColorNew(inst,
+ theme->titlebut_focused_unpressed_color->r,
+ theme->titlebut_focused_unpressed_color->g,
+ theme->titlebut_focused_unpressed_color->b);
+ if (!FIND(color, L("window","inactive","buttons","pressed","image"),
+ &theme->titlebut_unfocused_pressed_color, NULL))
+ theme->titlebut_unfocused_pressed_color =
+ RrColorNew(inst,
+ theme->titlebut_unfocused_unpressed_color->r,
+ theme->titlebut_unfocused_unpressed_color->g,
+ theme->titlebut_unfocused_unpressed_color->b);
+ if (!FIND(color, L("window","active","buttons","disabled","image"),
+ &theme->titlebut_disabled_focused_color, NULL))
+ theme->titlebut_disabled_focused_color =
+ RrColorNew(inst, 0xff, 0xff, 0xff);
+ if (!FIND(color, L("window","inactive","buttons","disabled","image"),
+ &theme->titlebut_disabled_unfocused_color, NULL))
+ theme->titlebut_disabled_unfocused_color = RrColorNew(inst, 0, 0, 0);
+ if (!FIND(color,
+ L("window","active","buttons","hover","image"),
+ &theme->titlebut_hover_focused_color, NULL))
+ theme->titlebut_hover_focused_color =
+ RrColorNew(inst,
+ theme->titlebut_focused_unpressed_color->r,
+ theme->titlebut_focused_unpressed_color->g,
+ theme->titlebut_focused_unpressed_color->b);
+ if (!FIND(color, L("window","inactive","buttons","hover","image"),
+ &theme->titlebut_hover_unfocused_color, NULL))
+ theme->titlebut_hover_unfocused_color =
+ RrColorNew(inst,
+ theme->titlebut_unfocused_unpressed_color->r,
+ theme->titlebut_unfocused_unpressed_color->g,
+ theme->titlebut_unfocused_unpressed_color->b);
+ if (!FIND(color,
+ L("window","active","buttons","toggled-pressed","image"),
+ &theme->titlebut_toggled_focused_pressed_color, NULL))
+ theme->titlebut_toggled_focused_pressed_color =
+ RrColorNew(inst,
+ theme->titlebut_focused_pressed_color->r,
+ theme->titlebut_focused_pressed_color->g,
+ theme->titlebut_focused_pressed_color->b);
+ if (!FIND(color,
+ L("window","inactive","buttons","toggled-pressed","image"),
+ &theme->titlebut_toggled_unfocused_pressed_color, NULL))
+ theme->titlebut_toggled_unfocused_pressed_color =
+ RrColorNew(inst,
+ theme->titlebut_unfocused_pressed_color->r,
+ theme->titlebut_unfocused_pressed_color->g,
+ theme->titlebut_unfocused_pressed_color->b);
+ if (!FIND(color,
+ L("window","active","buttons","toggled-unpressed","image"),
+ &theme->titlebut_toggled_focused_unpressed_color, NULL))
+ theme->titlebut_toggled_focused_unpressed_color =
+ RrColorNew(inst,
+ theme->titlebut_focused_pressed_color->r,
+ theme->titlebut_focused_pressed_color->g,
+ theme->titlebut_focused_pressed_color->b);
+ if (!FIND(color,
+ L("window","inactive","buttons","toggled-unpressed","image"),
+ &theme->titlebut_toggled_unfocused_unpressed_color, NULL))
+ theme->titlebut_toggled_unfocused_unpressed_color =
+ RrColorNew(inst,
+ theme->titlebut_unfocused_pressed_color->r,
+ theme->titlebut_unfocused_pressed_color->g,
+ theme->titlebut_unfocused_pressed_color->b);
+ if (!FIND(color,
+ L("window","active","buttons","toggled-hover","image"),
+ &theme->titlebut_toggled_hover_focused_color, NULL))
+ theme->titlebut_toggled_hover_focused_color =
+ RrColorNew(inst,
+ theme->titlebut_toggled_focused_unpressed_color->r,
+ theme->titlebut_toggled_focused_unpressed_color->g,
+ theme->titlebut_toggled_focused_unpressed_color->b);
+ if (!FIND(color,
+ L("window","inactive","buttons","toggled-hover","image"),
+ &theme->titlebut_toggled_hover_unfocused_color, NULL))
+ theme->titlebut_toggled_hover_unfocused_color =
+ RrColorNew(inst,
+ theme->titlebut_toggled_unfocused_unpressed_color->r,
+ theme->titlebut_toggled_unfocused_unpressed_color->g,
+ theme->titlebut_toggled_unfocused_unpressed_color->b);
+ if (!FIND(color, L("menu","title","text","primary"),
+ &theme->menu_title_color, NULL))