- if (!read_color(db, inst,
- "border.color", &theme->b_color))
- theme->b_color = RrColorNew(inst, 0, 0, 0);
- if (!read_color(db, inst,
- "window.active.client.color",
- &theme->cb_focused_color))
- theme->cb_focused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
- if (!read_color(db, inst,
- "window.inactive.client.color",
- &theme->cb_unfocused_color))
- theme->cb_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
- if (!read_color(db, inst,
- "window.active.label.text.color",
- &theme->title_focused_color))
- theme->title_focused_color = RrColorNew(inst, 0x0, 0x0, 0x0);
- if (!read_color(db, inst,
- "window.inactive.label.text.color",
- &theme->title_unfocused_color))
- theme->title_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
- if (!read_color(db, inst,
- "window.active.button.unpressed.image.color",
- &theme->titlebut_focused_unpressed_color))
- theme->titlebut_focused_unpressed_color = RrColorNew(inst, 0, 0, 0);
- if (!read_color(db, inst,
- "window.inactive.button.unpressed.image.color",
- &theme->titlebut_unfocused_unpressed_color))
- theme->titlebut_unfocused_unpressed_color =
+ if (!FIND(color, L("window","active","border"),
+ &theme->frame_focused_border_color, NULL))
+ theme->frame_focused_border_color = RrColorNew(inst, 0, 0, 0);
+ /* title separator focused color inherits from focused boder color */
+ if (!FIND(color, L("window","active","titleseparator"),
+ &theme->title_separator_focused_color, NULL))
+ theme->title_separator_focused_color =
+ RrColorNew(inst,
+ theme->frame_focused_border_color->r,
+ theme->frame_focused_border_color->g,
+ theme->frame_focused_border_color->b);
+ /* 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);
+ /* title separator unfocused color inherits from unfocused boder color */
+ if (!FIND(color, L("window","inactive","titleseparator"),
+ &theme->title_separator_unfocused_color, NULL))
+ theme->title_separator_unfocused_color =
+ RrColorNew(inst,
+ theme->frame_unfocused_border_color->r,
+ theme->frame_unfocused_border_color->g,
+ theme->frame_unfocused_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 =