FONT_PLACE_NONE = 0,
FONT_PLACE_UNKNOWN,
FONT_PLACE_ACTIVEWINDOW,
+ FONT_PLACE_INACTIVEWINDOW,
FONT_PLACE_MENUITEM,
FONT_PLACE_OSD,
/* TODO: Add all places based on Openbox's rc.xml */
* attribute, we set all font variables
*/
set_font_attr(&rc.font_activewindow, nodename, content);
+ set_font_attr(&rc.font_inactivewindow, nodename, content);
set_font_attr(&rc.font_menuitem, nodename, content);
set_font_attr(&rc.font_osd, nodename, content);
break;
case FONT_PLACE_ACTIVEWINDOW:
set_font_attr(&rc.font_activewindow, nodename, content);
break;
+ case FONT_PLACE_INACTIVEWINDOW:
+ set_font_attr(&rc.font_inactivewindow, nodename, content);
+ break;
case FONT_PLACE_MENUITEM:
set_font_attr(&rc.font_menuitem, nodename, content);
break;
}
if (!strcasecmp(place, "ActiveWindow")) {
return FONT_PLACE_ACTIVEWINDOW;
+ } else if (!strcasecmp(place, "InactiveWindow")) {
+ return FONT_PLACE_INACTIVEWINDOW;
} else if (!strcasecmp(place, "MenuItem")) {
return FONT_PLACE_MENUITEM;
} else if (!strcasecmp(place, "OnScreenDisplay")
rc.corner_radius = 8;
init_font_defaults(&rc.font_activewindow);
+ init_font_defaults(&rc.font_inactivewindow);
init_font_defaults(&rc.font_menuitem);
init_font_defaults(&rc.font_osd);
if (!rc.font_activewindow.name) {
rc.font_activewindow.name = xstrdup("sans");
}
+ if (!rc.font_inactivewindow.name) {
+ rc.font_inactivewindow.name = xstrdup("sans");
+ }
if (!rc.font_menuitem.name) {
rc.font_menuitem.name = xstrdup("sans");
}
rcxml_finish(void)
{
zfree(rc.font_activewindow.name);
+ zfree(rc.font_inactivewindow.name);
zfree(rc.font_menuitem.name);
zfree(rc.font_osd.name);
zfree(rc.theme_name);
bool title_unchanged = state->text && !strcmp(title, state->text);
float *text_color;
+ struct font *font = NULL;
struct ssd_part *part;
struct ssd_sub_tree *subtree;
struct ssd_state_title_width *dstate;
if (subtree == &ssd->titlebar.active) {
dstate = &state->active;
text_color = theme->window_active_label_text_color;
+ font = &rc.font_activewindow;
} else {
dstate = &state->inactive;
text_color = theme->window_inactive_label_text_color;
+ font = &rc.font_inactivewindow;
}
if (title_bg_width <= 0) {
}
if (part->buffer) {
- /* TODO: Do we only have active window fonts? */
scaled_font_buffer_update(part->buffer, title,
- title_bg_width, &rc.font_activewindow,
+ title_bg_width, font,
text_color, NULL);
}