all repos — openbox @ faeadd74d42b2d7f0af41aa6898d70eb616abf93

openbox fork - make it a bit more like ryudo

make focus and unfocus fonts for window titles. change 'xftfont' to 'font' in the themes.
Dana Jansens danakj@orodu.net
commit

faeadd74d42b2d7f0af41aa6898d70eb616abf93

parent

5958e0a07e52e6c482cd34383bb13e5712929767

M render/theme.crender/theme.c

@@ -87,14 +87,24 @@ theme->name = g_path_get_basename(DEFAULT_THEME);

} /* load the font stuff */ - if (!read_string(db, "window.title.xftfont", &font_str)) + if (!read_string(db, "window.focus.font", &font_str)) font_str = "arial,sans:bold:pixelsize=10:shadow=y:shadowtint=50"; - if (!(theme->winfont = RrFontOpen(inst, font_str))) { + if (!(theme->winfont_focused = RrFontOpen(inst, font_str))) { RrThemeFree(theme); return NULL; } - theme->winfont_height = RrFontHeight(theme->winfont); + theme->winfont_height = RrFontHeight(theme->winfont_focused); + + if (!read_string(db, "window.unfocus.font", &font_str)) + /* font_str will already be set to the last one */; + + if (!(theme->winfont_unfocused = RrFontOpen(inst, font_str))) { + RrThemeFree(theme); + return NULL; + } + theme->winfont_height = MAX(theme->winfont_height, + RrFontHeight(theme->winfont_unfocused)); winjust = RR_JUSTIFY_LEFT; if (read_string(db, "window.justify", &str)) {

@@ -104,7 +114,7 @@ else if (!g_ascii_strcasecmp(str, "center"))

winjust = RR_JUSTIFY_CENTER; } - if (!read_string(db, "menu.title.xftfont", &font_str)) + if (!read_string(db, "menu.title.font", &font_str)) font_str = "arial,sans:bold:pixelsize=12:shadow=y"; if (!(theme->mtitlefont = RrFontOpen(inst, font_str))) {

@@ -121,7 +131,7 @@ else if (!g_ascii_strcasecmp(str, "center"))

mtitlejust = RR_JUSTIFY_CENTER; } - if (!read_string(db, "menu.frame.xftfont", &font_str)) + if (!read_string(db, "menu.frame.font", &font_str)) font_str = "arial,sans:bold:pixelsize=11:shadow=y"; if (!(theme->mfont = RrFontOpen(inst, font_str))) {

@@ -606,7 +616,8 @@ theme->app_hilite_label->texture[0].type = RR_TEXTURE_TEXT;

theme->a_focused_label->texture[0].data.text.justify = winjust; theme->app_hilite_label->texture[0].data.text.justify = RR_JUSTIFY_LEFT; theme->a_focused_label->texture[0].data.text.font = - theme->app_hilite_label->texture[0].data.text.font = theme->winfont; + theme->app_hilite_label->texture[0].data.text.font = + theme->winfont_focused; theme->a_focused_label->texture[0].data.text.color = theme->app_hilite_label->texture[0].data.text.color = theme->title_focused_color;

@@ -616,7 +627,8 @@ theme->app_unhilite_label->texture[0].type = RR_TEXTURE_TEXT;

theme->a_unfocused_label->texture[0].data.text.justify = winjust; theme->app_unhilite_label->texture[0].data.text.justify = RR_JUSTIFY_LEFT; theme->a_unfocused_label->texture[0].data.text.font = - theme->app_unhilite_label->texture[0].data.text.font = theme->winfont; + theme->app_unhilite_label->texture[0].data.text.font = + theme->winfont_unfocused; theme->a_unfocused_label->texture[0].data.text.color = theme->app_unhilite_label->texture[0].data.text.color = theme->title_unfocused_color;

@@ -886,7 +898,8 @@ RrPixmapMaskFree(theme->close_hover_mask);

RrPixmapMaskFree(theme->close_pressed_mask); RrPixmapMaskFree(theme->menu_bullet_mask); - RrFontClose(theme->winfont); + RrFontClose(theme->winfont_focused); + RrFontClose(theme->winfont_unfocused); RrFontClose(theme->mtitlefont); RrFontClose(theme->mfont);
M render/theme.hrender/theme.h

@@ -46,7 +46,8 @@ RrColor *menu_hilite_color;

/* style settings - fonts */ gint winfont_height; - RrFont *winfont; + RrFont *winfont_focused; + RrFont *winfont_unfocused; gint mtitlefont_height; RrFont *mtitlefont; gint mfont_height;
M themes/BBstylE/themercthemes/BBstylE/themerc

@@ -138,9 +138,9 @@

window.title.layout: ILMC !! font me! -window.title.xftfont: Borzoi:pixelsize=10 -menu.frame.xftfont: National First Font:pixelsize=15 -menu.title.xftfont: Borzoi:pixelsize=10 +window.focus.font: Borzoi:pixelsize=10 +menu.frame.font: National First Font:pixelsize=15 +menu.title.font: Borzoi:pixelsize=10
M themes/I-merry/themercthemes/I-merry/themerc

@@ -128,6 +128,6 @@

!! Miscellaneous settings borderColor: #222222 !! font me! -window.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10 -menu.frame.xftfont: National First Font:pixelsize=15 -menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10 +window.focus.font: Bitstream Vera Sans:bold:pixelsize=10 +menu.frame.font: National First Font:pixelsize=15 +menu.title.font: Bitstream Vera Sans:bold:pixelsize=10
M themes/Light-Industry-big/themercthemes/Light-Industry-big/themerc

@@ -111,8 +111,9 @@ !borderColor: #091d2e

borderColor: #091d2e !! font me! -!window.title.xftfont: Borzoi:pixelsize=9:shadow=y:shadowtint=75 -window.title.xftfont: Bitstream Vera Sans:bold:pixelsize=11:shadow=y:shadowtint=30 -menu.frame.xftfont: National First Font:pixelsize=15 -!menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=75 -menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10 +!window.title.font: Borzoi:pixelsize=9:shadow=y:shadowtint=75 +window.focus.font: Bitstream Vera Sans:bold:pixelsize=11:shadow=y:shadowtint=30 +window.unfocus.font: Bitstream Vera Sans:bold:pixelsize=11 +menu.frame.font: National First Font:pixelsize=15 +!menu.title.font: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=75 +menu.title.font: Bitstream Vera Sans:bold:pixelsize=10
M themes/Light-Industry/themercthemes/Light-Industry/themerc

@@ -115,8 +115,9 @@ !borderColor: #091d2e

borderColor: #091d2e !! font me! -!window.title.xftfont: Borzoi:pixelsize=11 -window.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10 -menu.frame.xftfont: National First Font:pixelsize=15 -!menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=75 -menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10 +!window.title.font: Borzoi:pixelsize=11 +window.focus.font: Bitstream Vera Sans:bold:pixelsize=10:shadow=y:shadowoffset=1:shadowtint=75 +window.unfocus.font: Bitstream Vera Sans:bold:pixelsize=10 +menu.frame.font: National First Font:pixelsize=15 +!menu.title.font: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=75 +menu.title.font: Bitstream Vera Sans:bold:pixelsize=10
M themes/Om4Ob/openbox-3/themercthemes/Om4Ob/openbox-3/themerc

@@ -1,9 +1,9 @@

style.author: miklos style.date: Aug 1, 2003 -window.title.xftfont: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1 -menu.title.xftfont: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1 -menu.frame.xftfont: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1 +window.focus.font: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1 +menu.title.font: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1 +menu.frame.font: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1 ! Menu settings...
M themes/TheBear/openbox-3/themercthemes/TheBear/openbox-3/themerc

@@ -113,6 +113,6 @@ !! Miscellaneous settings

borderColor: #222222 !! font me! -window.title.xftfont: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=90 -menu.frame.xftfont: National First Font:pixelsize=15 -menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10 +window.focus.font: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=90 +menu.frame.font: National First Font:pixelsize=15 +menu.title.font: Bitstream Vera Sans:bold:pixelsize=10
M themes/greenz/themercthemes/greenz/themerc

@@ -113,8 +113,8 @@

window.title.layout: NLIMC !! font me! -#window.title.xftfont: Borzoi:pixelsize=11 -window.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10 -menu.frame.xftfont: National First Font:pixelsize=15 -#menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=75 -menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10 +#window.focus.font: Borzoi:pixelsize=11 +window.focus.font: Bitstream Vera Sans:bold:pixelsize=10 +menu.frame.font: National First Font:pixelsize=15 +#menu.title.font: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=75 +menu.title.font: Bitstream Vera Sans:bold:pixelsize=10
M themes/planton/themercthemes/planton/themerc

@@ -7,12 +7,6 @@ menu.title.colorTo: #39658b

menu.title.borderColor: #000000 menu.title.textColor: #ffffff menu.title.justify: center -menu.title.font: -b&h-lucida-medium-r-normal-sans-10-100-75-75-p-58-iso8859-1 -menu.title.xft.font: Microsoft Sans Serif -menu.title.xft.size: 6 -menu.title.xft.flags: normal -menu.title.xft.shadow.offset: 1 -menu.title.xft.shadow.tint: 25 menu.frame: raised solid bevel1 menu.frame.color: #f6f6f6

@@ -127,8 +121,8 @@ !! Miscellaneous settings

#borderColor: #222222 !! font me! -window.title.xftfont: Borzoi:pixelsize=10 -menu.frame.xftfont: National First Font:pixelsize=15 -menu.title.xftfont: Borzoi:pixelsize=10 +window.focus.font: Borzoi:pixelsize=10 +menu.frame.font: National First Font:pixelsize=15 +menu.title.font: Borzoi:pixelsize=10