add a separate font config for onscreendisplays
change menutitle in the rc to menuheader fix up the xsd for fonts
This commit is contained in:
parent
1c4c2b92a0
commit
4e590eba23
7 changed files with 45 additions and 12 deletions
|
@ -44,26 +44,32 @@
|
||||||
<keepBorder>yes</keepBorder>
|
<keepBorder>yes</keepBorder>
|
||||||
<hideDisabled>no</hideDisabled>
|
<hideDisabled>no</hideDisabled>
|
||||||
<font place="ActiveWindow">
|
<font place="ActiveWindow">
|
||||||
<name>arial,sans</name>
|
<name>sans</name>
|
||||||
<size>7</size>
|
<size>7</size>
|
||||||
<weight>bold</weight>
|
<weight>bold</weight>
|
||||||
<slant>normal</slant>
|
<slant>normal</slant>
|
||||||
</font>
|
</font>
|
||||||
<font place="InactiveWindow">
|
<font place="InactiveWindow">
|
||||||
<name>arial,sans</name>
|
<name>sans</name>
|
||||||
<size>7</size>
|
<size>7</size>
|
||||||
<weight>bold</weight>
|
<weight>bold</weight>
|
||||||
<slant>normal</slant>
|
<slant>normal</slant>
|
||||||
</font>
|
</font>
|
||||||
<font place="MenuTitle">
|
<font place="MenuHeader">
|
||||||
<name>arial,sans</name>
|
<name>sans</name>
|
||||||
<size>8</size>
|
<size>8</size>
|
||||||
<weight>bold</weight>
|
<weight>bold</weight>
|
||||||
<slant>normal</slant>
|
<slant>normal</slant>
|
||||||
</font>
|
</font>
|
||||||
<font place="MenuItem">
|
<font place="MenuItem">
|
||||||
<name>arial,sans</name>
|
<name>sans</name>
|
||||||
<size>8</size>
|
<size>9</size>
|
||||||
|
<weight>bold</weight>
|
||||||
|
<slant>normal</slant>
|
||||||
|
</font>
|
||||||
|
<font place="OnScreenDisplay">
|
||||||
|
<name>sans</name>
|
||||||
|
<size>9</size>
|
||||||
<weight>bold</weight>
|
<weight>bold</weight>
|
||||||
<slant>normal</slant>
|
<slant>normal</slant>
|
||||||
</font>
|
</font>
|
||||||
|
|
14
data/rc.xsd
14
data/rc.xsd
|
@ -47,10 +47,12 @@
|
||||||
Removing font shadows - they are going back into the themerc
|
Removing font shadows - they are going back into the themerc
|
||||||
Tue Apr 24 18:42:24 UTC 2007 - mikachu(a)openbox.org
|
Tue Apr 24 18:42:24 UTC 2007 - mikachu(a)openbox.org
|
||||||
Removed fourCorners option.
|
Removed fourCorners option.
|
||||||
Wed Apr 25 14:02:40 UTC 2007
|
Wed Apr 25 14:02:40 UTC 2007 - mikachu(a)openbox.org
|
||||||
Fixed values for layer to be above/below, not top/bottom.
|
Fixed values for layer to be above/below, not top/bottom.
|
||||||
Add chroot attribute and keybind element to keybind element.
|
Add chroot attribute and keybind element to keybind element.
|
||||||
Remove xsd:sequence from everywhere, we don't care about order.
|
Remove xsd:sequence from everywhere, we don't care about order.
|
||||||
|
Thu Apr 26 09:11:03 EDT 2007 - danakj(a)orodu.net
|
||||||
|
Add the place attribute for fonts
|
||||||
-->
|
-->
|
||||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||||
targetNamespace="http://openbox.org/"
|
targetNamespace="http://openbox.org/"
|
||||||
|
@ -117,6 +119,7 @@
|
||||||
<xsd:element minOccurs="0" name="size" type="xsd:integer"/>
|
<xsd:element minOccurs="0" name="size" type="xsd:integer"/>
|
||||||
<xsd:element minOccurs="0" name="weight" type="ob:fontweight"/>
|
<xsd:element minOccurs="0" name="weight" type="ob:fontweight"/>
|
||||||
<xsd:element minOccurs="0" name="slant" type="ob:fontslant"/>
|
<xsd:element minOccurs="0" name="slant" type="ob:fontslant"/>
|
||||||
|
<xsd:attribute name="place" type="ob:fontplace" use="required"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="desktops">
|
<xsd:complexType name="desktops">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
|
@ -333,6 +336,15 @@
|
||||||
<xsd:enumeration value="off"/>
|
<xsd:enumeration value="off"/>
|
||||||
</xsd:restriction>
|
</xsd:restriction>
|
||||||
</xsd:simpleType>
|
</xsd:simpleType>
|
||||||
|
<xsd:simpleType name="fontplace">
|
||||||
|
<xsd:restriction base="xsd:string">
|
||||||
|
<xsd:enumeration value="ActiveWindow"/>
|
||||||
|
<xsd:enumeration value="InactiveWindow"/>
|
||||||
|
<xsd:enumeration value="MenuHeader"/>
|
||||||
|
<xsd:enumeration value="MenuItem"/>
|
||||||
|
<xsd:enumeration value="OnScreenDisplay"/>
|
||||||
|
</xsd:restriction>
|
||||||
|
</xsd:simpleType>
|
||||||
<xsd:simpleType name="fontweight">
|
<xsd:simpleType name="fontweight">
|
||||||
<xsd:restriction base="xsd:string">
|
<xsd:restriction base="xsd:string">
|
||||||
<xsd:enumeration value="normal"/>
|
<xsd:enumeration value="normal"/>
|
||||||
|
|
|
@ -46,6 +46,7 @@ RrFont *config_font_activewindow;
|
||||||
RrFont *config_font_inactivewindow;
|
RrFont *config_font_inactivewindow;
|
||||||
RrFont *config_font_menuitem;
|
RrFont *config_font_menuitem;
|
||||||
RrFont *config_font_menutitle;
|
RrFont *config_font_menutitle;
|
||||||
|
RrFont *config_font_osd;
|
||||||
|
|
||||||
gint config_desktops_num;
|
gint config_desktops_num;
|
||||||
GSList *config_desktops_names;
|
GSList *config_desktops_names;
|
||||||
|
@ -467,10 +468,12 @@ static void parse_theme(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
|
||||||
font = &config_font_activewindow;
|
font = &config_font_activewindow;
|
||||||
else if (parse_attr_contains("InactiveWindow", n, "place"))
|
else if (parse_attr_contains("InactiveWindow", n, "place"))
|
||||||
font = &config_font_inactivewindow;
|
font = &config_font_inactivewindow;
|
||||||
else if (parse_attr_contains("MenuTitle", n, "place"))
|
else if (parse_attr_contains("MenuHeader", n, "place"))
|
||||||
font = &config_font_menutitle;
|
font = &config_font_menutitle;
|
||||||
else if (parse_attr_contains("MenuItem", n, "place"))
|
else if (parse_attr_contains("MenuItem", n, "place"))
|
||||||
font = &config_font_menuitem;
|
font = &config_font_menuitem;
|
||||||
|
else if (parse_attr_contains("OnScreenDisplay", n, "place"))
|
||||||
|
font = &config_font_osd;
|
||||||
else
|
else
|
||||||
goto next_font;
|
goto next_font;
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,8 @@ extern RrFont *config_font_inactivewindow;
|
||||||
extern RrFont *config_font_menutitle;
|
extern RrFont *config_font_menutitle;
|
||||||
/*! The font for menu items */
|
/*! The font for menu items */
|
||||||
extern RrFont *config_font_menuitem;
|
extern RrFont *config_font_menuitem;
|
||||||
|
/*! The font for on-screen-displays/popups */
|
||||||
|
extern RrFont *config_font_osd;
|
||||||
|
|
||||||
/*! The number of desktops */
|
/*! The number of desktops */
|
||||||
extern gint config_desktops_num;
|
extern gint config_desktops_num;
|
||||||
|
|
|
@ -241,7 +241,8 @@ gint main(gint argc, gchar **argv)
|
||||||
config_font_activewindow,
|
config_font_activewindow,
|
||||||
config_font_inactivewindow,
|
config_font_inactivewindow,
|
||||||
config_font_menutitle,
|
config_font_menutitle,
|
||||||
config_font_menuitem)))
|
config_font_menuitem,
|
||||||
|
config_font_osd)))
|
||||||
{
|
{
|
||||||
RrThemeFree(ob_rr_theme);
|
RrThemeFree(ob_rr_theme);
|
||||||
ob_rr_theme = theme;
|
ob_rr_theme = theme;
|
||||||
|
|
|
@ -66,7 +66,8 @@ static gboolean find_appearance(ParseState *ps, xmlNodePtr n, const gchar *names
|
||||||
|
|
||||||
RrTheme* RrThemeNew(const RrInstance *inst, gchar *name,
|
RrTheme* RrThemeNew(const RrInstance *inst, gchar *name,
|
||||||
RrFont *active_window_font, RrFont *inactive_window_font,
|
RrFont *active_window_font, RrFont *inactive_window_font,
|
||||||
RrFont *menu_title_font, RrFont *menu_item_font)
|
RrFont *menu_title_font, RrFont *menu_item_font,
|
||||||
|
RrFont *osd_font)
|
||||||
{
|
{
|
||||||
ParseState ps;
|
ParseState ps;
|
||||||
xmlNodePtr root;
|
xmlNodePtr root;
|
||||||
|
@ -173,6 +174,12 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name,
|
||||||
} else
|
} else
|
||||||
theme->menu_font = RrFontOpenDefault(inst);
|
theme->menu_font = RrFontOpenDefault(inst);
|
||||||
|
|
||||||
|
if (osd_font) {
|
||||||
|
theme->osd_font = osd_font;
|
||||||
|
RrFontRef(osd_font);
|
||||||
|
} else
|
||||||
|
theme->osd_font = RrFontOpenDefault(inst);
|
||||||
|
|
||||||
/* load direct dimensions */
|
/* load direct dimensions */
|
||||||
if (!FIND(int, L("menu","overlap"),
|
if (!FIND(int, L("menu","overlap"),
|
||||||
&theme->menu_overlap, -100, 100))
|
&theme->menu_overlap, -100, 100))
|
||||||
|
@ -771,8 +778,8 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name,
|
||||||
theme->a_focused_label->texture[0].data.text.justify = winjust;
|
theme->a_focused_label->texture[0].data.text.justify = winjust;
|
||||||
theme->osd_hilite_label->texture[0].data.text.justify = RR_JUSTIFY_LEFT;
|
theme->osd_hilite_label->texture[0].data.text.justify = RR_JUSTIFY_LEFT;
|
||||||
theme->a_focused_label->texture[0].data.text.font =
|
theme->a_focused_label->texture[0].data.text.font =
|
||||||
theme->osd_hilite_label->texture[0].data.text.font =
|
|
||||||
theme->win_font_focused;
|
theme->win_font_focused;
|
||||||
|
theme->osd_hilite_label->texture[0].data.text.font = theme->osd_font;
|
||||||
theme->a_focused_label->texture[0].data.text.color =
|
theme->a_focused_label->texture[0].data.text.color =
|
||||||
theme->title_focused_color;
|
theme->title_focused_color;
|
||||||
theme->osd_hilite_label->texture[0].data.text.color =
|
theme->osd_hilite_label->texture[0].data.text.color =
|
||||||
|
|
|
@ -34,6 +34,7 @@ struct _RrTheme {
|
||||||
RrFont *win_font_unfocused;
|
RrFont *win_font_unfocused;
|
||||||
RrFont *menu_title_font;
|
RrFont *menu_title_font;
|
||||||
RrFont *menu_font;
|
RrFont *menu_font;
|
||||||
|
RrFont *osd_font;
|
||||||
|
|
||||||
/* style settings - geometry */
|
/* style settings - geometry */
|
||||||
gint paddingx;
|
gint paddingx;
|
||||||
|
@ -226,7 +227,8 @@ struct _RrTheme {
|
||||||
the default font will be used. */
|
the default font will be used. */
|
||||||
RrTheme* RrThemeNew(const RrInstance *inst, gchar *theme,
|
RrTheme* RrThemeNew(const RrInstance *inst, gchar *theme,
|
||||||
RrFont *active_window_font, RrFont *inactive_window_font,
|
RrFont *active_window_font, RrFont *inactive_window_font,
|
||||||
RrFont *menu_title_font, RrFont *menu_item_font);
|
RrFont *menu_title_font, RrFont *menu_item_font,
|
||||||
|
RrFont *osd_font);
|
||||||
void RrThemeFree(RrTheme *theme);
|
void RrThemeFree(RrTheme *theme);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
Loading…
Reference in a new issue