- /* read the appearances for rendering non-decorations */
- theme->osd_hilite_bg = RrAppearanceCopy(theme->a_focused_title);
- theme->osd_hilite_label = RrAppearanceCopy(theme->a_focused_label);
- if (theme->a_focused_label->surface.grad != RR_SURFACE_PARENTREL)
- theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_label);
- else
- theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_title);
- if (theme->a_unfocused_label->surface.grad != RR_SURFACE_PARENTREL)
- theme->osd_unhilite_fg = RrAppearanceCopy(theme->a_unfocused_label);
- else
- theme->osd_unhilite_fg = RrAppearanceCopy(theme->a_unfocused_title);
+ /* read appearances for non-decorations (on-screen-display) */
+ if (!FIND(appearance, L("osd", "background"), theme->osd_hilite_bg, FALSE)) {
+ RrAppearanceFree(theme->osd_hilite_bg);
+ theme->osd_hilite_bg = RrAppearanceCopy(theme->a_focused_title);
+ }
+ if (!FIND(appearance, L("osd", "label"), theme->osd_hilite_label, TRUE)) {
+ RrAppearanceFree(theme->osd_hilite_label);
+ theme->osd_hilite_label = RrAppearanceCopy(theme->a_focused_label);
+ }
+ /* osd_hilite_fg can't be parentrel */
+ if (!FIND(appearance, L("osd", "hilight"), theme->osd_hilite_fg, FALSE)) {
+ RrAppearanceFree(theme->osd_hilite_fg);
+ if (theme->a_focused_label->surface.grad != RR_SURFACE_PARENTREL)
+ theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_label);
+ else
+ theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_title);
+ }
+ /* osd_unhilite_fg can't be parentrel either */
+ if (!FIND(appearance, L("osd", "unhilight"), theme->osd_unhilite_fg,
+ FALSE))
+ {
+ RrAppearanceFree(theme->osd_unhilite_fg);
+ if (theme->a_unfocused_label->surface.grad != RR_SURFACE_PARENTREL)
+ theme->osd_unhilite_fg=RrAppearanceCopy(theme->a_unfocused_label);
+ else
+ theme->osd_unhilite_fg=RrAppearanceCopy(theme->a_unfocused_title);
+ }