scary commit..but here goes.

YOUR THEMES ARE NOW OFFICIALLY BROKEN.

Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd

ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.

PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.

In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.

New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow

This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.

Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.

Here's the font configuration example. Hopefully ObConf will let you set this real soon.

<theme>
...
  <font place="ActiveWindow">
    <name>arial,sans</name>
    <size>7</size>
    <weight>bold</weight>
    <slant>normal</slant>
  </font>
  <font place="InactiveWindow">
    <name>arial,sans</name>
    <size>7</size>
    <weight>bold</weight>
    <slant>normal</slant>
  </font>
  <font place="MenuTitle">
    <name>arial,sans</name>
    <size>8</size>
    <weight>bold</weight>
    <slant>normal</slant>
  </font>
  <font place="MenuItem">
    <name>arial,sans</name>
    <size>8</size>
    <weight>bold</weight>
    <slant>normal</slant>
  </font>
</theme>
This commit is contained in:
Dana Jansens 2007-03-05 15:44:17 +00:00
parent d209d828a7
commit ec304c9e43
31 changed files with 2008 additions and 1519 deletions

View file

@ -28,9 +28,11 @@ lib_LTLIBRARIES = \
bin_PROGRAMS = \
openbox/openbox \
tools/themetoxml/themetoxml \
tools/gnome-panel-control/gnome-panel-control
noinst_PROGRAMS = \
tools/themetoxml/themetoxml
## render ##
render_rendertest_CPPFLAGS = \
@ -237,7 +239,7 @@ dist_mikachu_theme_DATA= \
themes/Mikachu/openbox-3/desk.xbm \
themes/Mikachu/openbox-3/iconify.xbm \
themes/Mikachu/openbox-3/max.xbm \
themes/Mikachu/openbox-3/themerc
themes/Mikachu/openbox-3/themerc.xml
natura_themedir = $(themedir)/Natura/openbox-3
@ -254,7 +256,7 @@ dist_natura_theme_DATA= \
themes/Natura/openbox-3/max_toggled.xbm \
themes/Natura/openbox-3/max.xbm \
themes/Natura/openbox-3/shade.xbm \
themes/Natura/openbox-3/themerc
themes/Natura/openbox-3/themerc.xml
artwizboxed_themedir = $(themedir)/artwiz-boxed/openbox-3
dist_artwizboxed_theme_DATA= \
@ -265,7 +267,7 @@ dist_artwizboxed_theme_DATA= \
themes/artwiz-boxed/openbox-3/iconify.xbm \
themes/artwiz-boxed/openbox-3/max_toggled.xbm \
themes/artwiz-boxed/openbox-3/max.xbm \
themes/artwiz-boxed/openbox-3/themerc
themes/artwiz-boxed/openbox-3/themerc.xml
bear2_themedir = $(themedir)/bear2/openbox-3
dist_bear2_theme_DATA= \
@ -282,11 +284,11 @@ dist_bear2_theme_DATA= \
themes/bear2/openbox-3/max.xbm \
themes/bear2/openbox-3/shade_pressed.xbm \
themes/bear2/openbox-3/shade.xbm \
themes/bear2/openbox-3/themerc
themes/bear2/openbox-3/themerc.xml
orang_themedir = $(themedir)/orang/openbox-3
dist_orang_theme_DATA= \
themes/orang/openbox-3/themerc
themes/orang/openbox-3/themerc.xml
syscrash_themedir = $(themedir)/syscrash/openbox-3
dist_syscrash_theme_DATA= \
@ -301,7 +303,7 @@ dist_syscrash_theme_DATA= \
themes/syscrash/openbox-3/max_toggled.xbm \
themes/syscrash/openbox-3/max.xbm \
themes/syscrash/openbox-3/shade.xbm \
themes/syscrash/openbox-3/themerc
themes/syscrash/openbox-3/themerc.xml
## public headers ##

169
data/themerc.xsd Executable file
View file

@ -0,0 +1,169 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://openbox.org/themerc"
xmlns:obt="http://openbox.org/themerc"
elementFormDefault="qualified"
version="1.0">
<xs:annotation>
<xs:documentation xml:lang="en">
Openbox theme definition
Version 1
Copyright 2007 Dana Jansens
</xs:documentation>
</xs:annotation>
<xs:element name="openbox_theme" type="obt:theme">
<xs:annotation>
<xs:documentation xml:lang="en">
The root node
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="padding">
<xs:attribute name="horizontal" type="xs:integer"/>
<xs:attribute name="vertical" type="xs:integer"/>
</xs:complexType>
<xs:complexType name="color">
<xs:attribute name="r" type="xs:integer"/>
<xs:attribute name="g" type="xs:integer"/>
<xs:attribute name="b" type="xs:integer"/>
<xs:attribute name="a" type="xs:integer"/>
</xs:complexType>
<xs:complexType name="point">
<xs:attribute name="x" type="xs:integer"/>
<xs:attribute name="y" type="xs:integer"/>
</xs:complexType>
<xs:simpleType name="justify">
<xs:restriction base="xs:string">
<xs:enumeration value="left"/>
<xs:enumeration value="right"/>
<xs:enumeration value="center"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="shadow">
<xs:all>
<xs:element name="offset" type="obt:point" minOccurs="0"/>
<xs:element name="primary" type="obt:color" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="text">
<xs:all>
<xs:element name="primary" type="obt:color" minOccurs="0"/>
<xs:element name="shadow" type="obt:shadow" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="textarea">
<xs:all>
<xs:element name="style" type="xs:string" minOccurs="0"/>
<xs:element name="primary" type="obt:color" minOccurs="0"/>
<xs:element name="secondary" type="obt:color" minOccurs="0"/>
<xs:element name="interlace" type="obt:color" minOccurs="0"/>
<xs:element name="border" type="obt:color" minOccurs="0"/>
<xs:element name="text" type="obt:text" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="area">
<xs:all>
<xs:element name="style" type="xs:string" minOccurs="0"/>
<xs:element name="primary" type="obt:color" minOccurs="0"/>
<xs:element name="secondary" type="obt:color" minOccurs="0"/>
<xs:element name="interlace" type="obt:color" minOccurs="0"/>
<xs:element name="border" type="obt:color" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="buttonarea">
<xs:all>
<xs:element name="style" type="xs:string" minOccurs="0"/>
<xs:element name="primary" type="obt:color" minOccurs="0"/>
<xs:element name="secondary" type="obt:color" minOccurs="0"/>
<xs:element name="interlace" type="obt:color" minOccurs="0"/>
<xs:element name="border" type="obt:color" minOccurs="0"/>
<xs:element name="image" type="obt:color" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="border">
<xs:all>
<xs:element name="primary" type="obt:color" minOccurs="0"/>
<xs:element name="width" type="xs:integer" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="allmenus">
<xs:all>
<xs:element name="border" type="obt:border" minOccurs="0"/>
<xs:element name="overlap" type="xs:integer" minOccurs="0"/>
<xs:element name="justify" type="obt:justify" minOccurs="0"/>
<xs:element name="title" type="obt:textarea" minOccurs="0"/>
<xs:element name="entries" type="obt:area" minOccurs="0"/>
<xs:element name="inactive" type="obt:text" minOccurs="0"/>
<xs:element name="active" type="obt:textarea" minOccurs="0"/>
<xs:element name="disabled" type="obt:text" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="allbuttons">
<xs:all>
<xs:element name="unpressed" type="obt:buttonarea" minOccurs="0"/>
<xs:element name="pressed" type="obt:buttonarea" minOccurs="0"/>
<xs:element name="hover" type="obt:buttonarea" minOccurs="0"/>
<xs:element name="disabled" type="obt:buttonarea" minOccurs="0"/>
<xs:element name="toggled" type="obt:buttonarea" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="window">
<xs:all>
<xs:element name="clientpadding" type="obt:color" minOccurs="0"/>
<xs:element name="titlebar" type="obt:area" minOccurs="0"/>
<xs:element name="label" type="obt:textarea" minOccurs="0"/>
<xs:element name="handle" type="obt:area" minOccurs="0"/>
<xs:element name="grip" type="obt:area" minOccurs="0"/>
<xs:element name="buttons" type="obt:allbuttons" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="allwindows">
<xs:all>
<xs:element name="clientpadding" type="obt:padding" minOccurs="0"/>
<xs:element name="justify" type="obt:justify" minOccurs="0"/>
<xs:element name="border" type="obt:border" minOccurs="0"/>
<xs:element name="inactive" type="obt:window" minOccurs="0"/>
<xs:element name="active" type="obt:window" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="allosd">
<xs:all>
<xs:element name="text" type="obt:text" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="themeDimensions">
<xs:all>
<xs:element name="padding" type="obt:padding" minOccurs="0"/>
<xs:element name="handle" type="xs:integer" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="theme">
<xs:all>
<xs:element name="dimensions" type="obt:themeDimensions" minOccurs="0"/>
<xs:element name="osd" type="obt:allosd" minOccurs="0"/>
<xs:element name="menu" type="obt:allmenus" minOccurs="0"/>
<xs:element name="window" type="obt:allwindows" minOccurs="0"/>
</xs:all>
<xs:attribute name="version" type="xs:integer" use="required" fixed="1"/>
</xs:complexType>
</xs:schema>

View file

@ -64,7 +64,7 @@ AC_DEFUN([OB_COMPILER_FLAGS],
if test "$GCC" = "yes"; then
AC_MSG_RESULT([yes])
if test "$DEBUG" = "yes"; then
FLAGS="$FLAGS -g -fno-inline -fno-strict-aliasing"
FLAGS="$FLAGS -O0 -g -fno-inline"
FLAGS="$FLAGS -Wall -Wsign-compare -Waggregate-return"
FLAGS="$FLAGS -Wcast-qual -Wbad-function-cast -Wpointer-arith"
# for Python.h
@ -73,6 +73,7 @@ AC_DEFUN([OB_COMPILER_FLAGS],
if test "$STRICT" = "yes"; then
FLAGS="$FLAGS -ansi -pedantic -D_XOPEN_SOURCE"
fi
FLAGS="$FLAGS -fno-strict-aliasing"
fi
AC_MSG_CHECKING([for compiler specific flags])
AC_MSG_RESULT([$FLAGS])

View file

@ -57,8 +57,8 @@ void dock_startup(gboolean reconfig)
GList *it;
XSetWindowBorder(ob_display, dock->frame,
RrColorPixel(ob_rr_theme->b_color));
XSetWindowBorderWidth(ob_display, dock->frame, ob_rr_theme->bwidth);
RrColorPixel(ob_rr_theme->frame_b_color));
XSetWindowBorderWidth(ob_display, dock->frame, ob_rr_theme->fbwidth);
RrAppearanceFree(dock->a_frame);
dock->a_frame = RrAppearanceCopy(ob_rr_theme->a_focused_title);
@ -91,8 +91,8 @@ void dock_startup(gboolean reconfig)
&attrib);
dock->a_frame = RrAppearanceCopy(ob_rr_theme->a_focused_title);
XSetWindowBorder(ob_display, dock->frame,
RrColorPixel(ob_rr_theme->b_color));
XSetWindowBorderWidth(ob_display, dock->frame, ob_rr_theme->bwidth);
RrColorPixel(ob_rr_theme->frame_b_color));
XSetWindowBorderWidth(ob_display, dock->frame, ob_rr_theme->fbwidth);
g_hash_table_insert(window_map, &dock->frame, dock);
stacking_add(DOCK_AS_WINDOW(dock));
@ -261,8 +261,8 @@ void dock_configure()
}
/* used for calculating offsets */
dock->w += ob_rr_theme->bwidth * 2;
dock->h += ob_rr_theme->bwidth * 2;
dock->w += ob_rr_theme->fbwidth * 2;
dock->h += ob_rr_theme->fbwidth * 2;
a = screen_physical_area();
@ -349,51 +349,51 @@ void dock_configure()
case OB_DIRECTION_NORTHWEST:
switch (config_dock_orient) {
case OB_ORIENTATION_HORZ:
dock->y -= dock->h - ob_rr_theme->bwidth;
dock->y -= dock->h - ob_rr_theme->fbwidth;
break;
case OB_ORIENTATION_VERT:
dock->x -= dock->w - ob_rr_theme->bwidth;
dock->x -= dock->w - ob_rr_theme->fbwidth;
break;
}
break;
case OB_DIRECTION_NORTH:
dock->y -= dock->h - ob_rr_theme->bwidth;
dock->y -= dock->h - ob_rr_theme->fbwidth;
break;
case OB_DIRECTION_NORTHEAST:
switch (config_dock_orient) {
case OB_ORIENTATION_HORZ:
dock->y -= dock->h - ob_rr_theme->bwidth;
dock->y -= dock->h - ob_rr_theme->fbwidth;
break;
case OB_ORIENTATION_VERT:
dock->x += dock->w - ob_rr_theme->bwidth;
dock->x += dock->w - ob_rr_theme->fbwidth;
break;
}
break;
case OB_DIRECTION_WEST:
dock->x -= dock->w - ob_rr_theme->bwidth;
dock->x -= dock->w - ob_rr_theme->fbwidth;
break;
case OB_DIRECTION_EAST:
dock->x += dock->w - ob_rr_theme->bwidth;
dock->x += dock->w - ob_rr_theme->fbwidth;
break;
case OB_DIRECTION_SOUTHWEST:
switch (config_dock_orient) {
case OB_ORIENTATION_HORZ:
dock->y += dock->h - ob_rr_theme->bwidth;
dock->y += dock->h - ob_rr_theme->fbwidth;
break;
case OB_ORIENTATION_VERT:
dock->x -= dock->w - ob_rr_theme->bwidth;
dock->x -= dock->w - ob_rr_theme->fbwidth;
break;
} break;
case OB_DIRECTION_SOUTH:
dock->y += dock->h - ob_rr_theme->bwidth;
dock->y += dock->h - ob_rr_theme->fbwidth;
break;
case OB_DIRECTION_SOUTHEAST:
switch (config_dock_orient) {
case OB_ORIENTATION_HORZ:
dock->y += dock->h - ob_rr_theme->bwidth;
dock->y += dock->h - ob_rr_theme->fbwidth;
break;
case OB_ORIENTATION_VERT:
dock->x += dock->w - ob_rr_theme->bwidth;
dock->x += dock->w - ob_rr_theme->fbwidth;
break;
}
break;
@ -402,8 +402,8 @@ void dock_configure()
}
if (!config_dock_floating && config_dock_hide) {
strw = ob_rr_theme->bwidth;
strh = ob_rr_theme->bwidth;
strw = ob_rr_theme->fbwidth;
strh = ob_rr_theme->fbwidth;
} else {
strw = dock->w;
strh = dock->h;
@ -501,8 +501,8 @@ void dock_configure()
dock->h += minh;
/* not used for actually sizing shit */
dock->w -= ob_rr_theme->bwidth * 2;
dock->h -= ob_rr_theme->bwidth * 2;
dock->w -= ob_rr_theme->fbwidth * 2;
dock->h -= ob_rr_theme->fbwidth * 2;
if (dock->dock_apps) {
g_assert(dock->w > 0);
@ -517,8 +517,8 @@ void dock_configure()
XUnmapWindow(ob_display, dock->frame);
/* but they are useful outside of this function! */
dock->w += ob_rr_theme->bwidth * 2;
dock->h += ob_rr_theme->bwidth * 2;
dock->w += ob_rr_theme->fbwidth * 2;
dock->h += ob_rr_theme->fbwidth * 2;
screen_update_areas();
}

View file

@ -597,9 +597,9 @@ static void event_handle_root(XEvent *e)
} else if (msgtype == prop_atoms.net_showing_desktop) {
screen_show_desktop(e->xclient.data.l[0] != 0);
} else if (msgtype == prop_atoms.ob_control) {
if ((Atom)e->xclient.data.l[0] == 1)
if (e->xclient.data.l[0] == 1)
ob_reconfigure();
else if ((Atom)e->xclient.data.l[0] == 2)
else if (e->xclient.data.l[0] == 2)
ob_restart();
}
break;

View file

@ -392,7 +392,7 @@ void focus_cycle_draw_indicator()
wt = wl = wr = wb = MAX(3,
ob_rr_theme->handle_height +
ob_rr_theme->bwidth * 2);
ob_rr_theme->fbwidth * 2);
x = focus_cycle_target->frame->area.x;
y = focus_cycle_target->frame->area.y;

View file

@ -159,15 +159,15 @@ static void set_theme_statics(ObFrame *self)
{
/* set colors/appearance/sizes for stuff that doesn't change */
XSetWindowBorder(ob_display, self->window,
RrColorPixel(ob_rr_theme->b_color));
RrColorPixel(ob_rr_theme->frame_b_color));
XSetWindowBorder(ob_display, self->title,
RrColorPixel(ob_rr_theme->b_color));
RrColorPixel(ob_rr_theme->frame_b_color));
XSetWindowBorder(ob_display, self->handle,
RrColorPixel(ob_rr_theme->b_color));
RrColorPixel(ob_rr_theme->frame_b_color));
XSetWindowBorder(ob_display, self->rgrip,
RrColorPixel(ob_rr_theme->b_color));
RrColorPixel(ob_rr_theme->frame_b_color));
XSetWindowBorder(ob_display, self->lgrip,
RrColorPixel(ob_rr_theme->b_color));
RrColorPixel(ob_rr_theme->frame_b_color));
XResizeWindow(ob_display, self->max,
ob_rr_theme->button_size, ob_rr_theme->button_size);
@ -181,14 +181,16 @@ static void set_theme_statics(ObFrame *self)
ob_rr_theme->button_size, ob_rr_theme->button_size);
XResizeWindow(ob_display, self->shade,
ob_rr_theme->button_size, ob_rr_theme->button_size);
if (ob_rr_theme->handle_height > 0) {
XResizeWindow(ob_display, self->lgrip,
ob_rr_theme->grip_width, ob_rr_theme->handle_height);
XResizeWindow(ob_display, self->rgrip,
ob_rr_theme->grip_width, ob_rr_theme->handle_height);
}
XResizeWindow(ob_display, self->tlresize,
ob_rr_theme->grip_width, ob_rr_theme->handle_height);
ob_rr_theme->grip_width, ob_rr_theme->top_grip_height);
XResizeWindow(ob_display, self->trresize,
ob_rr_theme->grip_width, ob_rr_theme->handle_height);
ob_rr_theme->grip_width, ob_rr_theme->top_grip_height);
/* set up the dynamic appearances */
self->a_unfocused_title = RrAppearanceCopy(ob_rr_theme->a_unfocused_title);
@ -272,8 +274,8 @@ void frame_adjust_shape(ObFrame *self)
num = 0;
if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
xrect[0].x = -ob_rr_theme->bwidth;
xrect[0].y = -ob_rr_theme->bwidth;
xrect[0].x = -ob_rr_theme->fbwidth;
xrect[0].y = -ob_rr_theme->fbwidth;
xrect[0].width = self->width + self->rbwidth * 2;
xrect[0].height = ob_rr_theme->title_height +
self->bwidth * 2;
@ -281,7 +283,7 @@ void frame_adjust_shape(ObFrame *self)
}
if (self->decorations & OB_FRAME_DECOR_HANDLE) {
xrect[1].x = -ob_rr_theme->bwidth;
xrect[1].x = -ob_rr_theme->fbwidth;
xrect[1].y = FRAME_HANDLE_Y(self);
xrect[1].width = self->width + self->rbwidth * 2;
xrect[1].height = ob_rr_theme->handle_height +
@ -308,8 +310,9 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
self->max_horz = self->client->max_horz;
if (self->decorations & OB_FRAME_DECOR_BORDER) {
self->bwidth = ob_rr_theme->bwidth;
self->cbwidth_x = self->cbwidth_y = ob_rr_theme->cbwidth;
self->bwidth = ob_rr_theme->fbwidth;
self->cbwidth_x = ob_rr_theme->cbwidthx;
self->cbwidth_y = ob_rr_theme->cbwidthy;
} else {
self->bwidth = self->cbwidth_x = self->cbwidth_y = 0;
}
@ -340,7 +343,7 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
self->innersize.top += ob_rr_theme->title_height + self->rbwidth +
(self->rbwidth - self->bwidth);
if (self->decorations & OB_FRAME_DECOR_HANDLE &&
ob_rr_theme->show_handle)
ob_rr_theme->handle_height > 0)
self->innersize.bottom += ob_rr_theme->handle_height +
self->rbwidth + (self->rbwidth - self->bwidth);
@ -382,7 +385,7 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
if (!fake) {
if (self->decorations & OB_FRAME_DECOR_HANDLE &&
ob_rr_theme->show_handle)
ob_rr_theme->handle_height > 0)
{
XMoveResizeWindow(ob_display, self->handle,
-self->bwidth, FRAME_HANDLE_Y(self),
@ -401,12 +404,6 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
XUnmapWindow(ob_display, self->lgrip);
XUnmapWindow(ob_display, self->rgrip);
}
/* XXX make a subwindow with these dimentions?
ob_rr_theme->grip_width + self->bwidth, 0,
self->width - (ob_rr_theme->grip_width + self->bwidth) * 2,
ob_rr_theme->handle_height);
*/
} else
XUnmapWindow(ob_display, self->handle);
@ -608,14 +605,14 @@ static void layout_title(ObFrame *self)
n = d = i = l = m = c = s = FALSE;
/* figure out whats being shown, and the width of the label */
self->label_width = self->width - (ob_rr_theme->padding + 1) * 2;
self->label_width = self->width - (ob_rr_theme->paddingx + 1) * 2;
for (lc = config_title_layout; *lc != '\0'; ++lc) {
switch (*lc) {
case 'N':
if (n) { *lc = ' '; break; } /* rm duplicates */
n = TRUE;
self->label_width -= (ob_rr_theme->button_size + 2 +
ob_rr_theme->padding + 1);
ob_rr_theme->paddingx + 1);
break;
case 'D':
if (d) { *lc = ' '; break; }
@ -624,7 +621,7 @@ static void layout_title(ObFrame *self)
break;
d = TRUE;
self->label_width -= (ob_rr_theme->button_size +
ob_rr_theme->padding + 1);
ob_rr_theme->paddingx + 1);
break;
case 'S':
if (s) { *lc = ' '; break; }
@ -633,7 +630,7 @@ static void layout_title(ObFrame *self)
break;
s = TRUE;
self->label_width -= (ob_rr_theme->button_size +
ob_rr_theme->padding + 1);
ob_rr_theme->paddingx + 1);
break;
case 'I':
if (i) { *lc = ' '; break; }
@ -642,7 +639,7 @@ static void layout_title(ObFrame *self)
break;
i = TRUE;
self->label_width -= (ob_rr_theme->button_size +
ob_rr_theme->padding + 1);
ob_rr_theme->paddingx + 1);
break;
case 'L':
if (l) { *lc = ' '; break; }
@ -655,7 +652,7 @@ static void layout_title(ObFrame *self)
break;
m = TRUE;
self->label_width -= (ob_rr_theme->button_size +
ob_rr_theme->padding + 1);
ob_rr_theme->paddingx + 1);
break;
case 'C':
if (c) { *lc = ' '; break; }
@ -664,7 +661,7 @@ static void layout_title(ObFrame *self)
break;
c = TRUE;
self->label_width -= (ob_rr_theme->button_size +
ob_rr_theme->padding + 1);
ob_rr_theme->paddingx + 1);
break;
}
}
@ -678,57 +675,57 @@ static void layout_title(ObFrame *self)
if (!m) XUnmapWindow(ob_display, self->max);
if (!c) XUnmapWindow(ob_display, self->close);
x = ob_rr_theme->padding + 1;
x = ob_rr_theme->paddingx + 1;
for (lc = config_title_layout; *lc != '\0'; ++lc) {
switch (*lc) {
case 'N':
if (!n) break;
self->icon_x = x;
XMapWindow(ob_display, self->icon);
XMoveWindow(ob_display, self->icon, x, ob_rr_theme->padding);
x += ob_rr_theme->button_size + 2 + ob_rr_theme->padding + 1;
XMoveWindow(ob_display, self->icon, x, ob_rr_theme->paddingx);
x += ob_rr_theme->button_size + 2 + ob_rr_theme->paddingx + 1;
break;
case 'D':
if (!d) break;
self->desk_x = x;
XMapWindow(ob_display, self->desk);
XMoveWindow(ob_display, self->desk, x, ob_rr_theme->padding + 1);
x += ob_rr_theme->button_size + ob_rr_theme->padding + 1;
XMoveWindow(ob_display, self->desk, x, ob_rr_theme->paddingx + 1);
x += ob_rr_theme->button_size + ob_rr_theme->paddingx + 1;
break;
case 'S':
if (!s) break;
self->shade_x = x;
XMapWindow(ob_display, self->shade);
XMoveWindow(ob_display, self->shade, x, ob_rr_theme->padding + 1);
x += ob_rr_theme->button_size + ob_rr_theme->padding + 1;
XMoveWindow(ob_display, self->shade, x, ob_rr_theme->paddingx + 1);
x += ob_rr_theme->button_size + ob_rr_theme->paddingx + 1;
break;
case 'I':
if (!i) break;
self->iconify_x = x;
XMapWindow(ob_display, self->iconify);
XMoveWindow(ob_display,self->iconify, x, ob_rr_theme->padding + 1);
x += ob_rr_theme->button_size + ob_rr_theme->padding + 1;
XMoveWindow(ob_display,self->iconify, x, ob_rr_theme->paddingx + 1);
x += ob_rr_theme->button_size + ob_rr_theme->paddingx + 1;
break;
case 'L':
if (!l) break;
self->label_x = x;
XMapWindow(ob_display, self->label);
XMoveWindow(ob_display, self->label, x, ob_rr_theme->padding);
x += self->label_width + ob_rr_theme->padding + 1;
XMoveWindow(ob_display, self->label, x, ob_rr_theme->paddingx);
x += self->label_width + ob_rr_theme->paddingx + 1;
break;
case 'M':
if (!m) break;
self->max_x = x;
XMapWindow(ob_display, self->max);
XMoveWindow(ob_display, self->max, x, ob_rr_theme->padding + 1);
x += ob_rr_theme->button_size + ob_rr_theme->padding + 1;
XMoveWindow(ob_display, self->max, x, ob_rr_theme->paddingx + 1);
x += ob_rr_theme->button_size + ob_rr_theme->paddingx + 1;
break;
case 'C':
if (!c) break;
self->close_x = x;
XMapWindow(ob_display, self->close);
XMoveWindow(ob_display, self->close, x, ob_rr_theme->padding + 1);
x += ob_rr_theme->button_size + ob_rr_theme->padding + 1;
XMoveWindow(ob_display, self->close, x, ob_rr_theme->paddingx + 1);
x += ob_rr_theme->button_size + ob_rr_theme->paddingx + 1;
break;
}
}

View file

@ -147,43 +147,42 @@ void framerender_frame(ObFrame *self)
ob_rr_theme->a_clear->surface.parenty = 0;
RrPaint(ob_rr_theme->a_clear, self->tlresize,
ob_rr_theme->grip_width, ob_rr_theme->handle_height);
ob_rr_theme->grip_width, ob_rr_theme->top_grip_height);
ob_rr_theme->a_clear->surface.parentx =
self->width - ob_rr_theme->grip_width;
RrPaint(ob_rr_theme->a_clear, self->trresize,
ob_rr_theme->grip_width, ob_rr_theme->handle_height);
ob_rr_theme->grip_width, ob_rr_theme->top_grip_height);
/* set parents for any parent relative guys */
l->surface.parent = t;
l->surface.parentx = self->label_x;
l->surface.parenty = ob_rr_theme->padding;
l->surface.parenty = ob_rr_theme->paddingy;
m->surface.parent = t;
m->surface.parentx = self->max_x;
m->surface.parenty = ob_rr_theme->padding + 1;
m->surface.parenty = ob_rr_theme->paddingy + 1;
n->surface.parent = t;
n->surface.parentx = self->icon_x;
n->surface.parenty = ob_rr_theme->padding;
n->surface.parenty = ob_rr_theme->paddingy;
i->surface.parent = t;
i->surface.parentx = self->iconify_x;
i->surface.parenty = ob_rr_theme->padding + 1;
i->surface.parenty = ob_rr_theme->paddingy + 1;
d->surface.parent = t;
d->surface.parentx = self->desk_x;
d->surface.parenty = ob_rr_theme->padding + 1;
d->surface.parenty = ob_rr_theme->paddingy + 1;
s->surface.parent = t;
s->surface.parentx = self->shade_x;
s->surface.parenty = ob_rr_theme->padding + 1;
s->surface.parenty = ob_rr_theme->paddingy + 1;
c->surface.parent = t;
c->surface.parentx = self->close_x;
c->surface.parenty = ob_rr_theme->padding + 1;
c->surface.parenty = ob_rr_theme->paddingy + 1;
framerender_label(self, l);
framerender_max(self, m);
@ -194,7 +193,9 @@ void framerender_frame(ObFrame *self)
framerender_close(self, c);
}
if (self->decorations & OB_FRAME_DECOR_HANDLE) {
if (self->decorations & OB_FRAME_DECOR_HANDLE &&
ob_rr_theme->handle_height > 0)
{
RrAppearance *h, *g;
h = (self->focused ?

View file

@ -313,7 +313,7 @@ void menu_show(gchar *name, gint x, gint y, ObClient *client)
menu_frame_move(frame, x, y);
} else
menu_frame_move(frame,
x - ob_rr_theme->bwidth, y - ob_rr_theme->bwidth);
x - ob_rr_theme->mbwidth, y - ob_rr_theme->mbwidth);
for (i = 0; i < screen_num_monitors; ++i) {
Rect *a = screen_physical_area_monitor(i);
if (RECT_CONTAINS(*a, x, y)) {

View file

@ -412,25 +412,25 @@ static void menu_frame_render(ObMenuFrame *self)
gboolean has_icon = FALSE;
ObMenu *sub;
XSetWindowBorderWidth(ob_display, self->window, ob_rr_theme->bwidth);
XSetWindowBorderWidth(ob_display, self->window, ob_rr_theme->mbwidth);
XSetWindowBorder(ob_display, self->window,
RrColorPixel(ob_rr_theme->b_color));
RrColorPixel(ob_rr_theme->menu_b_color));
if (!self->parent && self->show_title) {
XMoveWindow(ob_display, self->title,
-ob_rr_theme->bwidth, h - ob_rr_theme->bwidth);
-ob_rr_theme->mbwidth, h - ob_rr_theme->mbwidth);
self->a_title->texture[0].data.text.string = self->menu->title;
RrMinsize(self->a_title, &tw, &th);
tw = MIN(tw, MAX_MENU_WIDTH) + ob_rr_theme->padding * 2;
tw = MIN(tw, MAX_MENU_WIDTH) + ob_rr_theme->paddingx * 2;
w = MAX(w, tw);
th = ob_rr_theme->menu_title_height;
h += (self->title_h = th + ob_rr_theme->bwidth);
h += (self->title_h = th + ob_rr_theme->mbwidth);
XSetWindowBorderWidth(ob_display, self->title, ob_rr_theme->bwidth);
XSetWindowBorderWidth(ob_display, self->title, ob_rr_theme->mbwidth);
XSetWindowBorder(ob_display, self->title,
RrColorPixel(ob_rr_theme->b_color));
RrColorPixel(ob_rr_theme->menu_b_color));
}
XMoveWindow(ob_display, self->items, 0, h);
@ -538,9 +538,9 @@ static void menu_frame_render(ObMenuFrame *self)
if (!self->parent && self->show_title) {
XResizeWindow(ob_display, self->title,
w, self->title_h - ob_rr_theme->bwidth);
w, self->title_h - ob_rr_theme->mbwidth);
RrPaint(self->a_title, self->title,
w, self->title_h - ob_rr_theme->bwidth);
w, self->title_h - ob_rr_theme->mbwidth);
XMapWindow(ob_display, self->title);
} else
XUnmapWindow(ob_display, self->title);
@ -550,8 +550,8 @@ static void menu_frame_render(ObMenuFrame *self)
for (it = self->entries; it; it = g_list_next(it))
menu_entry_frame_render(it->data);
w += ob_rr_theme->bwidth * 2;
h += ob_rr_theme->bwidth * 2;
w += ob_rr_theme->mbwidth * 2;
h += ob_rr_theme->mbwidth * 2;
RECT_SET_SIZE(self->area, w, h);
@ -721,8 +721,8 @@ ObMenuEntryFrame* menu_entry_frame_under(gint x, gint y)
GList *it;
if ((frame = menu_frame_under(x, y))) {
x -= ob_rr_theme->bwidth + frame->area.x;
y -= frame->title_h + ob_rr_theme->bwidth + frame->area.y;
x -= ob_rr_theme->mbwidth + frame->area.x;
y -= frame->title_h + ob_rr_theme->mbwidth + frame->area.y;
for (it = frame->entries; it; it = g_list_next(it)) {
ObMenuEntryFrame *e = it->data;
@ -795,7 +795,7 @@ void menu_entry_frame_show_submenu(ObMenuEntryFrame *self)
self->frame->area.x
+ self->frame->area.width
- ob_rr_theme->menu_overlap
- ob_rr_theme->bwidth,
- ob_rr_theme->mbwidth,
self->frame->area.y
+ self->frame->title_h
+ self->area.y

View file

@ -36,8 +36,8 @@ ObPopup *popup_new(gboolean hasicon)
self->hasicon = hasicon;
self->gravity = NorthWestGravity;
self->x = self->y = self->w = self->h = 0;
self->a_bg = RrAppearanceCopy(ob_rr_theme->app_hilite_bg);
self->a_text = RrAppearanceCopy(ob_rr_theme->app_hilite_label);
self->a_bg = RrAppearanceCopy(ob_rr_theme->osd_hilite_bg);
self->a_text = RrAppearanceCopy(ob_rr_theme->osd_hilite_label);
attrib.override_redirect = True;
self->bg = XCreateWindow(ob_display, RootWindow(ob_display, ob_screen),
@ -88,11 +88,11 @@ void popup_size_to_string(ObPopup *self, gchar *text)
self->a_text->texture[0].data.text.string = text;
RrMinsize(self->a_text, &textw, &texth);
/*XXX textw += ob_rr_theme->bevel * 2;*/
texth += ob_rr_theme->padding * 2;
texth += ob_rr_theme->paddingy * 2;
self->h = texth + ob_rr_theme->padding * 2;
self->h = texth + ob_rr_theme->paddingy * 2;
iconw = (self->hasicon ? texth : 0);
self->w = textw + iconw + ob_rr_theme->padding * (self->hasicon ? 3 : 2);
self->w = textw + iconw + ob_rr_theme->paddingx * (self->hasicon ? 3 : 2);
}
void popup_set_text_align(ObPopup *self, RrJustify align)
@ -115,8 +115,8 @@ void popup_show(ObPopup *self, gchar *text)
RrMargins(self->a_bg, &l, &t, &r, &b);
XSetWindowBorderWidth(ob_display, self->bg, ob_rr_theme->bwidth);
XSetWindowBorder(ob_display, self->bg, ob_rr_theme->b_color->pixel);
XSetWindowBorderWidth(ob_display, self->bg, ob_rr_theme->fbwidth);
XSetWindowBorder(ob_display, self->bg, ob_rr_theme->frame_b_color->pixel);
/* set up the textures */
self->a_text->texture[0].data.text.string = text;
@ -124,22 +124,22 @@ void popup_show(ObPopup *self, gchar *text)
/* measure the shit out */
RrMinsize(self->a_text, &textw, &texth);
/*XXX textw += ob_rr_theme->padding * 2;*/
texth += ob_rr_theme->padding * 2;
texth += ob_rr_theme->paddingy * 2;
/* set the sizes up and reget the text sizes from the calculated
outer sizes */
if (self->h) {
h = self->h;
texth = h - (t+b + ob_rr_theme->padding * 2);
texth = h - (t+b + ob_rr_theme->paddingy * 2);
} else
h = t+b + texth + ob_rr_theme->padding * 2;
h = t+b + texth + ob_rr_theme->paddingy * 2;
iconw = (self->hasicon ? texth : 0);
if (self->w) {
w = self->w;
textw = w - (l+r + iconw + ob_rr_theme->padding *
textw = w - (l+r + iconw + ob_rr_theme->paddingx *
(self->hasicon ? 3 : 2));
} else
w = l+r + textw + iconw + ob_rr_theme->padding *
w = l+r + textw + iconw + ob_rr_theme->paddingx *
(self->hasicon ? 3 : 2);
/* sanity checks to avoid crashes! */
if (w < 1) w = 1;
@ -185,12 +185,12 @@ void popup_show(ObPopup *self, gchar *text)
self->a_text->surface.parent = self->a_bg;
self->a_text->surface.parentx = l + iconw +
ob_rr_theme->padding * (self->hasicon ? 2 : 1);
self->a_text->surface.parenty = t + ob_rr_theme->padding;
ob_rr_theme->paddingx * (self->hasicon ? 2 : 1);
self->a_text->surface.parenty = t + ob_rr_theme->paddingy;
XMoveResizeWindow(ob_display, self->text,
l + iconw + ob_rr_theme->padding *
l + iconw + ob_rr_theme->paddingx *
(self->hasicon ? 2 : 1),
t + ob_rr_theme->padding, textw, texth);
t + ob_rr_theme->paddingy, textw, texth);
RrPaint(self->a_bg, self->bg, w, h);
RrPaint(self->a_text, self->text, textw, texth);
@ -198,7 +198,8 @@ void popup_show(ObPopup *self, gchar *text)
if (self->hasicon) {
if (iconw < 1) iconw = 1; /* sanity check for crashes */
if (self->draw_icon)
self->draw_icon(l + ob_rr_theme->padding, t + ob_rr_theme->padding,
self->draw_icon(l + ob_rr_theme->paddingx,
t + ob_rr_theme->paddingy,
iconw, texth, self->draw_icon_data);
}
@ -282,20 +283,20 @@ static void pager_popup_draw_icon(gint px, gint py, gint w, gint h,
guint r, c;
gint eachw, eachh;
eachw = (w - ob_rr_theme->bwidth -
(screen_desktop_layout.columns * ob_rr_theme->bwidth))
eachw = (w - ob_rr_theme->fbwidth -
(screen_desktop_layout.columns * ob_rr_theme->fbwidth))
/ screen_desktop_layout.columns;
eachh = (h - ob_rr_theme->bwidth -
(screen_desktop_layout.rows * ob_rr_theme->bwidth))
eachh = (h - ob_rr_theme->fbwidth -
(screen_desktop_layout.rows * ob_rr_theme->fbwidth))
/ screen_desktop_layout.rows;
/* make them squares */
eachw = eachh = MIN(eachw, eachh);
/* center */
px += (w - (screen_desktop_layout.columns * (eachw + ob_rr_theme->bwidth) +
ob_rr_theme->bwidth)) / 2;
py += (h - (screen_desktop_layout.rows * (eachh + ob_rr_theme->bwidth) +
ob_rr_theme->bwidth)) / 2;
px += (w - (screen_desktop_layout.columns * (eachw + ob_rr_theme->fbwidth) +
ob_rr_theme->fbwidth)) / 2;
py += (h - (screen_desktop_layout.rows * (eachh + ob_rr_theme->fbwidth) +
ob_rr_theme->fbwidth)) / 2;
if (eachw <= 0 || eachh <= 0)
return;
@ -361,10 +362,10 @@ static void pager_popup_draw_icon(gint px, gint py, gint w, gint h,
rown = n;
for (r = 0, y = 0; r < screen_desktop_layout.rows;
++r, y += eachh + ob_rr_theme->bwidth)
++r, y += eachh + ob_rr_theme->fbwidth)
{
for (c = 0, x = 0; c < screen_desktop_layout.columns;
++c, x += eachw + ob_rr_theme->bwidth)
++c, x += eachw + ob_rr_theme->fbwidth)
{
RrAppearance *a;
@ -393,8 +394,8 @@ ObPagerPopup *pager_popup_new()
self->desks = 0;
self->wins = g_new(Window, self->desks);
self->hilight = RrAppearanceCopy(ob_rr_theme->app_hilite_fg);
self->unhilight = RrAppearanceCopy(ob_rr_theme->app_unhilite_fg);
self->hilight = RrAppearanceCopy(ob_rr_theme->osd_hilite_fg);
self->unhilight = RrAppearanceCopy(ob_rr_theme->osd_unhilite_fg);
self->popup->draw_icon = pager_popup_draw_icon;
self->popup->draw_icon_data = self;
@ -432,9 +433,9 @@ void pager_popup_show(ObPagerPopup *self, gchar *text, guint desk)
for (i = self->desks; i < screen_num_desktops; ++i) {
XSetWindowAttributes attr;
attr.border_pixel = RrColorPixel(ob_rr_theme->b_color);
attr.border_pixel = RrColorPixel(ob_rr_theme->frame_b_color);
self->wins[i] = XCreateWindow(ob_display, self->popup->bg,
0, 0, 1, 1, ob_rr_theme->bwidth,
0, 0, 1, 1, ob_rr_theme->fbwidth,
RrDepth(ob_rr_inst), InputOutput,
RrVisual(ob_rr_inst), CWBorderPixel,
&attr);

View file

@ -1,7 +1,7 @@
/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
parse.c for the Openbox window manager
Copyright (c) 2003 Ben Jansens
Copyright (c) 2003-2007 Dana Jansens
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -22,6 +22,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
static gboolean xdg_start;
static gchar *xdg_config_home_path;
@ -67,7 +68,7 @@ void parse_register(ObParseInst *i, const gchar *tag,
struct Callback *c;
if ((c = g_hash_table_lookup(i->callbacks, tag))) {
g_warning("tag '%s' already registered", tag);
g_warning("Tag '%s' already registered", tag);
return;
}
@ -90,7 +91,35 @@ gboolean parse_load_rc(xmlDocPtr *doc, xmlNodePtr *root)
g_free(path);
}
if (!r)
g_warning("unable to find a valid config file, using defaults");
g_warning("Unable to find a valid config file, using defaults");
return r;
}
gboolean parse_load_theme(const gchar *name, xmlDocPtr *doc, xmlNodePtr *root,
gchar **retpath)
{
GSList *it;
gchar *path;
gboolean r = FALSE;
/* backward compatibility.. */
path = g_build_filename(g_get_home_dir(), ".themes", name,
"openbox-3", "themerc.xml", NULL);
if ((r = parse_load(path, "openbox_theme", doc, root)))
*retpath = g_path_get_dirname(path);
g_free(path);
if (!r) {
for (it = xdg_data_dir_paths; !r && it; it = g_slist_next(it)) {
path = g_build_filename(it->data, "themes", name, "openbox-3",
"themerc.xml", NULL);
if ((r = parse_load(path, "openbox_theme", doc, root)))
*retpath = g_path_get_dirname(path);
g_free(path);
}
}
if (!r)
g_warning("Unable to load the theme %s", name);
return r;
}
@ -110,14 +139,20 @@ gboolean parse_load_menu(const gchar *file, xmlDocPtr *doc, xmlNodePtr *root)
}
}
if (!r)
g_warning("unable to find a valid menu file '%s'", file);
g_warning("Unable to find a valid menu file '%s'", file);
return r;
}
gboolean parse_load(const gchar *path, const gchar *rootname,
xmlDocPtr *doc, xmlNodePtr *root)
{
if ((*doc = xmlParseFile(path))) {
struct stat s;
if (stat(path, &s) < 0)
return FALSE;
/* XML_PARSE_BLANKS is needed apparently. When it loads a theme file,
without this option, the tree is weird and has extra nodes in it. */
if ((*doc = xmlReadFile(path, NULL, XML_PARSE_NOBLANKS))) {
*root = xmlDocGetRootElement(*doc);
if (!*root) {
xmlFreeDoc(*doc);
@ -127,7 +162,7 @@ gboolean parse_load(const gchar *path, const gchar *rootname,
if (xmlStrcasecmp((*root)->name, (const xmlChar*)rootname)) {
xmlFreeDoc(*doc);
*doc = NULL;
g_warning("document %s is of wrong type. root node is "
g_warning("Document %s is of wrong type. root node is "
"not '%s'", path, rootname);
}
}
@ -150,7 +185,7 @@ gboolean parse_load_mem(gpointer data, guint len, const gchar *rootname,
if (xmlStrcasecmp((*root)->name, (const xmlChar*)rootname)) {
xmlFreeDoc(*doc);
*doc = NULL;
g_warning("document in given memory is of wrong type. root "
g_warning("Document in given memory is of wrong type. root "
"node is not '%s'", rootname);
}
}
@ -395,6 +430,10 @@ void parse_paths_shutdown()
g_free(it->data);
g_slist_free(xdg_data_dir_paths);
xdg_data_dir_paths = NULL;
g_free(xdg_config_home_path);
xdg_config_home_path = NULL;
g_free(xdg_data_home_path);
xdg_data_home_path = NULL;
}
gchar *parse_expand_tilde(const gchar *f)

View file

@ -38,6 +38,9 @@ void parse_shutdown(ObParseInst *inst);
gboolean parse_load_rc(xmlDocPtr *doc, xmlNodePtr *root);
/* Loads an Openbox menu, from the normal paths */
gboolean parse_load_menu(const gchar *file, xmlDocPtr *doc, xmlNodePtr *root);
/* Loads an Openbox menu, from the normal paths */
gboolean parse_load_theme(const gchar *name, xmlDocPtr *doc, xmlNodePtr *root,
gchar **path);
void parse_register(ObParseInst *inst, const gchar *tag,
ParseCallback func, gpointer data);

View file

@ -121,29 +121,29 @@ void RrFontClose(RrFont *f)
}
static void font_measure_full(const RrFont *f, const gchar *str,
gint *x, gint *y, gint shadow_offset)
gint *x, gint *y, gint shadow_x, gint shadow_y)
{
PangoRectangle rect;
pango_layout_set_text(f->layout, str, -1);
pango_layout_set_width(f->layout, -1);
pango_layout_get_pixel_extents(f->layout, NULL, &rect);
*x = rect.width + ABS(shadow_offset);
*y = rect.height + ABS(shadow_offset);
*x = rect.width + ABS(shadow_x);
*y = rect.height + ABS(shadow_y);
}
RrSize *RrFontMeasureString(const RrFont *f, const gchar *str,
gint shadow_offset)
gint shadow_x, gint shadow_y)
{
RrSize *size;
size = g_new(RrSize, 1);
font_measure_full(f, str, &size->width, &size->height, shadow_offset);
font_measure_full(f, str, &size->width, &size->height, shadow_x, shadow_y);
return size;
}
gint RrFontHeight(const RrFont *f, gint shadow_offset)
gint RrFontHeight(const RrFont *f, gint shadow_y)
{
return (f->ascent + f->descent) / PANGO_SCALE + ABS(shadow_offset);
return (f->ascent + f->descent) / PANGO_SCALE + ABS(shadow_y);
}
static inline int font_calculate_baseline(RrFont *f, gint height)
@ -207,27 +207,17 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
break;
}
if (t->shadow_offset) {
if (t->shadow_tint >= 0) {
c.color.red = 0;
c.color.green = 0;
c.color.blue = 0;
c.color.alpha = 0xffff * t->shadow_tint / 100;
c.pixel = BlackPixel(RrDisplay(t->font->inst),
RrScreen(t->font->inst));
} else {
c.color.red = 0xffff;
c.color.green = 0xffff;
c.color.blue = 0xffff;
c.color.alpha = 0xffff * -t->shadow_tint / 100;
c.pixel = WhitePixel(RrDisplay(t->font->inst),
RrScreen(t->font->inst));
}
if (t->shadow_offset_x || t->shadow_offset_y) {
c.color.red = t->shadow_color->r | t->shadow_color->r << 8;
c.color.green = t->shadow_color->g | t->shadow_color->g << 8;
c.color.blue = t->shadow_color->b | t->shadow_color->b << 8;
c.color.alpha = 0xffff * t->shadow_alpha / 255;
c.pixel = t->shadow_color->pixel;
/* see below... */
pango_xft_render_layout_line
(d, &c, pango_layout_get_line(t->font->layout, 0),
(x + t->shadow_offset) * PANGO_SCALE,
(y + t->shadow_offset) * PANGO_SCALE);
(x + t->shadow_offset_x) * PANGO_SCALE,
(y + t->shadow_offset_y) * PANGO_SCALE);
}
c.color.red = t->color->r | t->color->r << 8;

View file

@ -349,10 +349,11 @@ void RrMinsize(RrAppearance *a, gint *w, gint *h)
case RR_TEXTURE_TEXT:
m = RrFontMeasureString(a->texture[i].data.text.font,
a->texture[i].data.text.string,
a->texture[i].data.text.shadow_offset);
a->texture[i].data.text.shadow_offset_x,
a->texture[i].data.text.shadow_offset_y);
*w = MAX(*w, m->width + 4);
m->height = RrFontHeight(a->texture[i].data.text.font,
a->texture[i].data.text.shadow_offset);
a->texture[i].data.text.shadow_offset_y);
*h += MAX(*h, m->height);
g_free(m);
break;

View file

@ -2,7 +2,7 @@
render.h for the Openbox window manager
Copyright (c) 2006 Mikael Magnusson
Copyright (c) 2003 Ben Jansens
Copyright (c) 2003-2007 Dana Jansens
Copyright (c) 2003 Derek Foreman
This program is free software; you can redistribute it and/or modify
@ -121,8 +121,10 @@ struct _RrTextureText {
RrJustify justify;
RrColor *color;
gchar *string;
gint shadow_offset;
gchar shadow_tint;
gint shadow_offset_x;
gint shadow_offset_y;
RrColor *shadow_color;
gchar shadow_alpha;
};
struct _RrPixmapMask {
@ -231,8 +233,8 @@ RrFont *RrFontOpen (const RrInstance *inst, gchar *name, gint size,
RrFont *RrFontOpenDefault (const RrInstance *inst);
void RrFontClose (RrFont *f);
RrSize *RrFontMeasureString (const RrFont *f, const gchar *str,
gint shadow_offset);
gint RrFontHeight (const RrFont *f, gint shadow_offset);
gint shadow_offset_x, gint shadow_offset_y);
gint RrFontHeight (const RrFont *f, gint shadow_offset_y);
gint RrFontMaxCharWidth (const RrFont *f);
void RrPaint (RrAppearance *a, Window win, gint w, gint h);

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
theme.h for the Openbox window manager
Copyright (c) 2006 Mikael Magnusson
Copyright (c) 2003 Ben Jansens
Copyright (c) 2003-2007 Dana Jansens
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -27,28 +27,37 @@ G_BEGIN_DECLS
typedef struct _RrTheme RrTheme;
struct _RrTheme {
gchar *path;
gchar *name;
const RrInstance *inst;
/* style settings - optional decor */
gboolean show_handle;
/* style settings - fonts */
RrFont *win_font_focused;
RrFont *win_font_unfocused;
RrFont *menu_title_font;
RrFont *menu_font;
/* style settings - geometry */
gint padding;
gint paddingx;
gint paddingy;
gint handle_height;
gint bwidth;
gint cbwidth;
gint fbwidth; /*!< frame border width */
gint mbwidth; /*!< menu border width */
gint cbwidthx;
gint cbwidthy;
gint menu_overlap;
/* these ones are calculated, not set directly by the theme file */
gint win_font_height;
gint menu_title_font_height;
gint menu_font_height;
gint label_height;
gint title_height;
gint menu_title_height;
gint button_size;
gint grip_width;
gint menu_overlap;
gint top_grip_height;
/* style settings - colors */
RrColor *b_color;
RrColor *menu_b_color;
RrColor *frame_b_color;
RrColor *cb_focused_color;
RrColor *cb_unfocused_color;
RrColor *title_focused_color;
@ -67,15 +76,21 @@ struct _RrTheme {
RrColor *menu_color;
RrColor *menu_disabled_color;
RrColor *menu_selected_color;
/* style settings - fonts */
gint win_font_height;
RrFont *win_font_focused;
RrFont *win_font_unfocused;
gint menu_title_font_height;
RrFont *menu_title_font;
gint menu_font_height;
RrFont *menu_font;
RrColor *title_focused_shadow_color;
gchar title_focused_shadow_alpha;
RrColor *title_unfocused_shadow_color;
gchar title_unfocused_shadow_alpha;
RrColor *osd_color;
RrColor *osd_shadow_color;
gchar osd_shadow_alpha;
RrColor *menu_title_shadow_color;
gchar menu_title_shadow_alpha;
RrColor *menu_text_normal_shadow_color;
gchar menu_text_normal_shadow_alpha;
RrColor *menu_text_selected_shadow_color;
gchar menu_text_selected_shadow_alpha;
RrColor *menu_text_disabled_shadow_color;
gchar menu_text_disabled_shadow_alpha;
/* style settings - pics */
RrPixel32 *def_win_icon; /* 48x48 RGBA */
@ -178,12 +193,10 @@ struct _RrTheme {
RrAppearance *a_clear; /* clear with no texture */
RrAppearance *a_clear_tex; /* clear with a texture */
RrAppearance *app_hilite_bg;
RrAppearance *app_unhilite_bg;
RrAppearance *app_hilite_fg; /* never parent relative */
RrAppearance *app_unhilite_fg; /* never parent relative */
RrAppearance *app_hilite_label; /* can be parent relative */
RrAppearance *app_unhilite_label; /* can be parent relative */
RrAppearance *osd_hilite_bg; /* can never be parent relative */
RrAppearance *osd_hilite_fg; /* can never be parent relative */
RrAppearance *osd_hilite_label; /* can be parent relative */
RrAppearance *osd_unhilite_fg; /* can never be parent relative */
};

View file

@ -1,159 +0,0 @@
!! Menu settings
menu.title.bg: raised gradient crossdiagonal bevel1
menu.title.bg.color: #6699CC
menu.title.bg.colorTo: #334866
menu.title.bg.border.color: #000000
menu.title.text.color: #CCCCFF
menu.title.text.justify: center
menu.items.bg: flat gradient horizontal bevel1
menu.items.bg.color: #AAAACC
menu.items.bg.colorTo: #AAAAD0
menu.items.bg.border.color: #000000
menu.items.text.color: #000022
menu.items.disabled.text.color: #711
menu.items.active.bg: raised gradient horizontal bevel1
menu.items.active.bg.color: #555577
menu.items.active.bg.colorTo: #6699CC
menu.items.active.bg.border.color: #000000
menu.items.active.text.color: #CCCCFF
menu.frame.justify: left
!! General window settings
window.label.text.justify: left
!! focused window settings
window.active.client.color: #8080A0
window.active.title.bg: raised gradient crossdiagonal bevel1
window.active.title.bg.color: #6699CC
window.active.title.bg.colorTo: #334866
window.active.title.bg.border.color: #000000
window.active.handle.bg: flat gradient crossdiagonal bevel1
window.active.handle.bg.color: #6699CC
window.active.handle.bg.colorTo: #334866
window.active.handle.bg.border.color: #000000
window.active.grip.bg: parentrelative
window.active.grip.bg.color: #000000
window.active.grip.bg.colorTo: #000000
window.active.grip.bg.border.color: #000000
window.active.label.bg: parentrelative
window.active.label.bg.color: #000000
window.active.label.bg.colorTo: #000000
window.active.label.bg.border.color: #000000
window.active.label.text.color: #BFE9FF
window.active.button.unpressed.bg: parentrelative
window.active.button.unpressed.bg.color: #000000
window.active.button.unpressed.bg.colorTo: #000000
window.active.button.unpressed.bg.border.color: #000000
window.active.button.unpressed.image.color: grey85
window.active.button.pressed.bg: sunken gradient crossdiagonal bevel1
window.active.button.pressed.bg.color: #6699CC
window.active.button.pressed.bg.colorTo: #334866
window.active.button.pressed.bg.border.color: #000000
window.active.button.pressed.image.color: green
window.active.button.toggled.bg: sunken gradient crossdiagonal bevel1
window.active.button.toggled.bg.color: #6699CC
window.active.button.toggled.bg.colorTo: #334866
window.active.button.toggled.bg.border.color: #000000
window.active.button.toggled.image.color: grey85
window.active.button.disabled.bg: parentrelative
window.active.button.disabled.bg.color: #000000
window.active.button.disabled.bg.colorTo: #000000
window.active.button.disabled.image.color: #000000
window.active.button.disabled.bg.border.color: #000000
window.active.button.hover.bg: parentrelative
window.active.button.hover.image.color: #00FF00
window.active.button.hover.bg.color: #000000
window.active.button.hover.bg.colorTo: #000000
window.active.button.hover.bg.border.color: #000000
!window.active.button.hover.bg: raised gradient crossdiagonal bevel1
!window.active.button.hover.image.color: #00FF00
!window.active.button.hover.bg.color: #334866
!window.active.button.hover.bg.colorTo: #6699CC
!window.active.button.hover.bg.border.color: #000000
!! unfocused window settings
window.inactive.client.color: grey50
window.inactive.title.bg: flat gradient diagonal bevel1
window.inactive.title.bg.color: #7F7F88
window.inactive.title.bg.colorTo: #33333B
window.inactive.title.bg.border.color: #000000
window.inactive.handle.bg: flat gradient diagonal bevel1
window.inactive.handle.bg.color: grey50
window.inactive.handle.bg.colorTo: grey20
window.inactive.handle.bg.border.color: #000000
window.inactive.grip.bg: parentrelative
window.inactive.grip.bg.color: #000000
window.inactive.grip.bg.colorTo: #000000
window.inactive.grip.bg.border.color: #000000
window.inactive.label.bg: parentrelative
window.inactive.label.bg.color: #000000
window.inactive.label.bg.colorTo: #000000
window.inactive.label.bg.border.color: #000000
window.inactive.label.text.color: grey70
window.inactive.button.unpressed.bg: parentrelative
window.inactive.button.unpressed.bg.color: #000000
window.inactive.button.unpressed.bg.colorTo: #000000
window.inactive.button.unpressed.bg.border.color: #000000
window.inactive.button.unpressed.image.color: grey60
window.inactive.button.pressed.bg: sunken gradient crossdiagonal bevel1
window.inactive.button.pressed.bg.color: grey60
window.inactive.button.pressed.bg.colorTo: grey20
window.inactive.button.pressed.bg.border.color: #000000
window.inactive.button.pressed.image.color: #00CC00
window.inactive.button.disabled.bg: parentrelative
window.inactive.button.disabled.bg.color: #000000
window.inactive.button.disabled.bg.colorTo: #000000
window.inactive.button.disabled.bg.border.color: #000000
window.inactive.button.disabled.image.color: #000000
window.inactive.button.toggled.bg: sunken gradient crossdiagonal bevel1
window.inactive.button.toggled.bg.color: grey60
window.inactive.button.toggled.bg.colorTo: grey20
window.inactive.button.toggled.bg.border.color: #000000
window.inactive.button.toggled.image.color: grey60
window.inactive.button.hover.bg: parentrelative
window.inactive.button.hover.bg.color: #000000
window.inactive.button.hover.bg.colorTo: #000000
window.inactive.button.hover.image.color: #00CC00
window.inactive.button.hover.bg.border.color: #000000
!! Global width settings
border.width: 1
padding.width: 1
window.handle.width: 0
window.client.padding.width: 0
focus.inner.color: #A6CAF3
focus.outer.color: #0000A0
!! Miscellaneous settings
border.color: #223344
!! Font stuff
window.active.label.text.font: Candara,sans:pixelsize=14:shadow=n:weight=0
window.inactive.label.text.font: Candara,sans:pixelsize=14:shadowoffset=3:shadowtint=32:shadow=y:weight=0
menu.title.text.font: Technical,sans:pixelsize=26:shadowoffset=2:shadowtint=35:shadow=y
menu.items.font: Technical,sans:pixelsize=14:shadowoffset=2:shadowtint=15:shadow=y
!menu.overlap: 3

View file

@ -0,0 +1,194 @@
<?xml version="1.0"?>
<openbox_theme version="1" xmlns="http://openbox.org/themerc">
<dimensions>
<handle>0</handle>
<padding horizontal="1" vertical="1"/>
</dimensions>
<window>
<border>
<width>1</width>
<primary r="34" g="51" b="68" a="255"/>
</border>
<clientpadding horizontal="0" vertical="0"/>
<justify>left</justify>
<active>
<clientpadding r="128" g="128" b="160" a="255"/>
<label>
<text>
<primary r="191" g="233" b="255" a="255"/>
</text>
<style>parentrelative</style>
<primary r="0" g="0" b="0" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</label>
<buttons>
<unpressed>
<image r="217" g="217" b="217" a="255"/>
<style>parentrelative</style>
<primary r="0" g="0" b="0" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</unpressed>
<pressed>
<image r="0" g="255" b="0" a="255"/>
<style>sunken gradient crossdiagonal bevel1</style>
<primary r="102" g="153" b="204" a="255"/>
<secondary r="51" g="72" b="102" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</pressed>
<disabled>
<image r="0" g="0" b="0" a="255"/>
<style>parentrelative</style>
<primary r="0" g="0" b="0" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</disabled>
<hover>
<image r="0" g="255" b="0" a="255"/>
<style>parentrelative</style>
<primary r="0" g="0" b="0" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</hover>
<toggled>
<image r="217" g="217" b="217" a="255"/>
<style>sunken gradient crossdiagonal bevel1</style>
<primary r="102" g="153" b="204" a="255"/>
<secondary r="51" g="72" b="102" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</toggled>
</buttons>
<titlebar>
<style>raised gradient crossdiagonal bevel1</style>
<primary r="102" g="153" b="204" a="255"/>
<secondary r="51" g="72" b="102" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</titlebar>
<handle>
<style>flat gradient crossdiagonal bevel1</style>
<primary r="102" g="153" b="204" a="255"/>
<secondary r="51" g="72" b="102" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</handle>
<grip>
<style>parentrelative</style>
<primary r="0" g="0" b="0" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</grip>
</active>
<inactive>
<clientpadding r="127" g="127" b="127" a="255"/>
<label>
<text>
<primary r="179" g="179" b="179" a="255"/>
<shadow>
<offset x="3" y="3"/>
<primary r="0" g="0" b="0" a="32"/>
</shadow>
</text>
<style>parentrelative</style>
<primary r="0" g="0" b="0" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</label>
<buttons>
<unpressed>
<image r="153" g="153" b="153" a="255"/>
<style>parentrelative</style>
<primary r="0" g="0" b="0" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</unpressed>
<pressed>
<image r="0" g="204" b="0" a="255"/>
<style>sunken gradient crossdiagonal bevel1</style>
<primary r="153" g="153" b="153" a="255"/>
<secondary r="51" g="51" b="51" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</pressed>
<disabled>
<image r="0" g="0" b="0" a="255"/>
<style>parentrelative</style>
<primary r="0" g="0" b="0" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</disabled>
<hover>
<image r="0" g="204" b="0" a="255"/>
<style>parentrelative</style>
<primary r="0" g="0" b="0" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</hover>
<toggled>
<image r="153" g="153" b="153" a="255"/>
<style>sunken gradient crossdiagonal bevel1</style>
<primary r="153" g="153" b="153" a="255"/>
<secondary r="51" g="51" b="51" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</toggled>
</buttons>
<titlebar>
<style>flat gradient diagonal bevel1</style>
<primary r="127" g="127" b="136" a="255"/>
<secondary r="51" g="51" b="59" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</titlebar>
<handle>
<style>flat gradient diagonal bevel1</style>
<primary r="127" g="127" b="127" a="255"/>
<secondary r="51" g="51" b="51" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</handle>
<grip>
<style>parentrelative</style>
<primary r="0" g="0" b="0" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</grip>
</inactive>
</window>
<menu>
<border>
<width>1</width>
<primary r="34" g="51" b="68" a="255"/>
</border>
<justify>center</justify>
<title>
<text>
<primary r="204" g="204" b="255" a="255"/>
<shadow>
<offset x="2" y="2"/>
<primary r="0" g="0" b="0" a="35"/>
</shadow>
</text>
<style>raised gradient crossdiagonal bevel1</style>
<primary r="102" g="153" b="204" a="255"/>
<secondary r="51" g="72" b="102" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</title>
<inactive>
<primary r="0" g="0" b="34" a="255"/>
</inactive>
<disabled>
<primary r="119" g="17" b="17" a="255"/>
</disabled>
<active>
<text>
<primary r="204" g="204" b="255" a="255"/>
</text>
<style>raised gradient horizontal bevel1</style>
<primary r="85" g="85" b="119" a="255"/>
<secondary r="102" g="153" b="204" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</active>
<entries>
<style>flat gradient horizontal bevel1</style>
<primary r="170" g="170" b="204" a="255"/>
<secondary r="170" g="170" b="208" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</entries>
</menu>
</openbox_theme>

View file

@ -1,96 +0,0 @@
!! Natura by quandar (http://deletefactory.net/quandar)
!! Global Width
window.handle.width: 2
window.client.padding.width: 0
border.Width: 1
padding.width: 2
border.color: #000000
menu.overlap: 0
window.frameColor: #eeeeee
window.*.client.color: #eeeeee
*.text.justify: left
!! Menu
menu.title.bg: flat gradient splitvertical
menu.title.bg.color: #5c4e45
menu.title.bg.colorTo: #51443e
menu.title.text.color: #ffffff
menu.items.bg: flat solid
menu.items.bg.color: #f9f2ee
menu.items.text.color: #000000
menu.items.disabled.text.color: #737573
menu.items.active.bg: flat gradient splitvertical
menu.items.active.bg.color: #5c4e45
menu.items.active.bg.colorTo:#51443e
menu.items.active.text.color: #f9f2ee
!! Active Windows
window.active.title.bg: flat gradient splitvertical
window.active.title.bg.color: #5c4e45
window.active.title.bg.colorTo: #51443e
window.active.*.bg.border.color: #000000
window.active.label.bg: parentrelative
window.active.label.text.color: #f9f2ee
window.active.button.*.bg: parentrelative
window.active.button.*.image.color: #f9f2ee
window.active.button.*.bg.border.color: #4e5860
window.active.button.hover.bg.color: #576773
window.active.button.hover.bg.border.color: #9aabb9
window.active.button.pressed.bg.color: #343b40
window.active.button.pressed.bg.colorTo: #000000
window.active.button.pressed.image.color: #b6b6b6
window.active.button.pressed.bg.border.color: #95a5b2
window.active.button.disabled.bg: parentrelative
window.active.button.disabled.image.color: #ffffff
window.active.handle.bg: flat solid
window.active.handle.bg.color:#51443e
window.*.grip.bg: flat solid
window.*.grip.bg.color: #51443e
window.handle.width: 2
!! Inactive Windows
window.inactive.title.bg: flat gradient vertical
window.inactive.title.bg.color: #f0ece3
window.inactive.title.bg.colorTo: #f8f7f2
window.inactive.*.border.color: #bfbfbf
window.inactive.label.bg: parentrelative
window.inactive.label.text.color: #919191
window.inactive.button.*.bg: parentrelative
window.inactive.button.*.bg.color: #eeeeee
window.inactive.button.*.image.color: #b6b6b6
window.inactive.button.*.bg.border.color: #c9c9c9
window.inactive.button.pressed.bg.color: #c5c2c5
window.inactive.button.pressed.bg.border.color: #7b7d7b
window.inactive.button.pressed.image.color: #999999
window.inactive.button.hover.bg.color: #afb1b2
window.inactive.button.hover.bg.border.color: #d9dfe4
window.inactive.button.hover.image.color: #ffffff
window.inactive.button.disabled.bg: parentrelative
window.inactive.button.disabled.image.color: #ffffff
window.inactive.handle.bg: flat solid
window.inactive.handle.bg.color: #f9f7f3
window.inactive.grip.bg: parentrelative
!! Fonts
window.active.label.text.font: sans:pixelsize=12:bold:shadow=y:shadowoffset=1:shadowtint=75
window.inactive.label.text.font: sans:pixelsize=12:bold:shadow=y:shadowoffset=1:shadowtint=0
menu.items.font: sans:pixelsize=12
menu.title.text.font: sans:pixelsize=12:bold:shadow=y:shadowoffset=1:shadowtint=75

View file

@ -0,0 +1,177 @@
<!-- Natura by quandar (http://deletefactory.net/quandar) -->
<?xml version="1.0"?>
<openbox_theme version="1" xmlns="http://openbox.org/themerc">
<dimensions>
<handle>2</handle>
<padding horizontal="2" vertical="2"/>
</dimensions>
<window>
<border>
<width>1</width>
<primary r="0" g="0" b="0" a="255"/>
</border>
<clientpadding horizontal="0" vertical="0"/>
<justify>left</justify>
<active>
<clientpadding r="238" g="238" b="238" a="255"/>
<label>
<text>
<primary r="249" g="242" b="238" a="255"/>
<shadow>
<offset x="1" y="1"/>
<primary r="0" g="0" b="0" a="75"/>
</shadow>
</text>
<style>parentrelative</style>
<border r="0" g="0" b="0" a="255"/>
</label>
<buttons>
<unpressed>
<image r="249" g="242" b="238" a="255"/>
<style>parentrelative</style>
<border r="78" g="88" b="96" a="255"/>
</unpressed>
<pressed>
<image r="182" g="182" b="182" a="255"/>
<style>parentrelative</style>
<primary r="52" g="59" b="64" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
<border r="149" g="165" b="178" a="255"/>
</pressed>
<disabled>
<image r="255" g="255" b="255" a="255"/>
<style>parentrelative</style>
<border r="78" g="88" b="96" a="255"/>
</disabled>
<hover>
<image r="249" g="242" b="238" a="255"/>
<style>parentrelative</style>
<primary r="87" g="103" b="115" a="255"/>
<border r="154" g="171" b="185" a="255"/>
</hover>
<toggled>
<image r="249" g="242" b="238" a="255"/>
<style>parentrelative</style>
<border r="78" g="88" b="96" a="255"/>
</toggled>
</buttons>
<titlebar>
<style>flat gradient splitvertical</style>
<primary r="92" g="78" b="69" a="255"/>
<secondary r="81" g="68" b="62" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</titlebar>
<handle>
<style>flat solid</style>
<primary r="81" g="68" b="62" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</handle>
<grip>
<style>flat solid</style>
<primary r="81" g="68" b="62" a="255"/>
<border r="0" g="0" b="0" a="255"/>
</grip>
</active>
<inactive>
<clientpadding r="238" g="238" b="238" a="255"/>
<label>
<text>
<primary r="145" g="145" b="145" a="255"/>
<shadow>
<offset x="1" y="1"/>
<primary r="255" g="255" b="255" a="0"/>
</shadow>
</text>
<style>parentrelative</style>
<border r="191" g="191" b="191" a="255"/>
</label>
<buttons>
<unpressed>
<image r="182" g="182" b="182" a="255"/>
<style>parentrelative</style>
<primary r="238" g="238" b="238" a="255"/>
<border r="201" g="201" b="201" a="255"/>
</unpressed>
<pressed>
<image r="153" g="153" b="153" a="255"/>
<style>parentrelative</style>
<primary r="197" g="194" b="197" a="255"/>
<border r="123" g="125" b="123" a="255"/>
</pressed>
<disabled>
<image r="255" g="255" b="255" a="255"/>
<style>parentrelative</style>
<primary r="238" g="238" b="238" a="255"/>
<border r="201" g="201" b="201" a="255"/>
</disabled>
<hover>
<image r="255" g="255" b="255" a="255"/>
<style>parentrelative</style>
<primary r="175" g="177" b="178" a="255"/>
<border r="217" g="223" b="228" a="255"/>
</hover>
<toggled>
<image r="182" g="182" b="182" a="255"/>
<style>parentrelative</style>
<primary r="238" g="238" b="238" a="255"/>
<border r="201" g="201" b="201" a="255"/>
</toggled>
</buttons>
<titlebar>
<style>flat gradient vertical</style>
<primary r="240" g="236" b="227" a="255"/>
<secondary r="248" g="247" b="242" a="255"/>
<border r="191" g="191" b="191" a="255"/>
</titlebar>
<handle>
<style>flat solid</style>
<primary r="249" g="247" b="243" a="255"/>
<border r="191" g="191" b="191" a="255"/>
</handle>
<grip>
<style>parentrelative</style>
<primary r="81" g="68" b="62" a="255"/>
<border r="191" g="191" b="191" a="255"/>
</grip>
</inactive>
</window>
<menu>
<border>
<width>1</width>
<primary r="0" g="0" b="0" a="255"/>
</border>
<justify>left</justify>
<overlap>0</overlap>
<title>
<text>
<primary r="255" g="255" b="255" a="255"/>
<shadow>
<offset x="1" y="1"/>
<primary r="0" g="0" b="0" a="75"/>
</shadow>
</text>
<style>flat gradient splitvertical</style>
<primary r="92" g="78" b="69" a="255"/>
<secondary r="81" g="68" b="62" a="255"/>
</title>
<inactive>
<primary r="0" g="0" b="0" a="255"/>
</inactive>
<disabled>
<primary r="115" g="117" b="115" a="255"/>
</disabled>
<active>
<text>
<primary r="249" g="242" b="238" a="255"/>
</text>
<style>flat gradient splitvertical</style>
<primary r="92" g="78" b="69" a="255"/>
<secondary r="81" g="68" b="62" a="255"/>
</active>
<entries>
<style>flat solid</style>
<primary r="249" g="242" b="238" a="255"/>
</entries>
</menu>
</openbox_theme>

View file

@ -1,102 +0,0 @@
menu.title.bg: raised gradient diagonal
menu.title.bg.color: rgb:90/94/98
menu.title.bg.colorTo: rgb:20/24/28
menu.title.text.color: white
menu.title.text.justify: center
menu.items.bg: sunken gradient diagonal
menu.items.bg.color: rgb:10/20/30
menu.items.bg.colorTo: rgb:70/80/90
menu.items.text.color: rgb:90/a0/b0
menu.items.justify: center
menu.items.active.bg: raised gradient diagonal
menu.items.active.bg.color: rgb:90/94/98
menu.items.active.bg.colorTo: rgb:20/24/28
menu.items.active.text.color: white
menu.bullet.image.color: rgb:90/a0/b0
menu.bullet.selected.image.color: #ffffff
window.active.title.bg: raised gradient vertical
window.active.title.bg.color: rgb:80/84/88
window.active.title.bg.colorTo: rgb:30/34/38
window.inactive.title.bg: raised vertical gradient
window.inactive.title.bg.color: rgb:50/54/58
window.inactive.title.bg.colorTo: black
window.active.label.bg: sunken diagonal gradient
window.active.label.bg.color: rgb:10/20/30
window.active.label.bg.colorTo: rgb:70/80/90
window.active.label.text.color: white
window.inactive.label.bg: sunken gradient diagonal
window.inactive.label.bg.color: black
window.inactive.label.bg.colorTo: rgb:40/50/60
window.inactive.label.text.color: rgb:60/64/68
window.label.text.justify: center
window.active.button.unpressed.bg: raised gradient diagonal
window.active.button.unpressed.bg.color: rgb:90/94/98
window.active.button.unpressed.bg.colorTo: rgb:20/24/28
window.active.button.unpressed.image.color: white
window.inactive.button.unpressed.bg: raised gradient diagonal
window.inactive.button.unpressed.bg.color: rgb:50/54/58
window.inactive.button.unpressed.bg.colorTo: black
window.inactive.button.unpressed.image.color: rgb:70/74/78
window.active.button.pressed.bg: sunken gradient diagonal
window.active.button.pressed.bg.color: rgb:20/40/50
window.active.button.pressed.bg.colorTo: rgb:60/70/80
window.inactive.button.pressed.bg: sunken gradient diagonal
window.inactive.button.pressed.bg.color: rgb:50/54/58
window.inactive.button.pressed.bg.colorTo: black
window.inactive.button.pressed.image.color: rgb:70/74/78
window.active.client.color: rgb:40/44/48
window.inactive.client.color: rgb:20/24/28
window.active.handle.bg: raised gradient diagonal
window.active.handle.bg.color: rgb:70/74/78
window.active.handle.bg.colorTo: rgb:40/44/48
window.inactive.handle.bg: raised gradient diagonal
window.inactive.handle.bg.color: rgb:50/54/58
window.inactive.handle.bg.colorTo: black
window.active.grip.bg: sunken diagonal gradient
window.active.grip.bg.color: rgb:20/30/40
window.active.grip.bg.colorTo: rgb:60/70/80
window.inactive.grip.bg: sunken diagonal gradient
window.inactive.grip.bg.color: black
window.inactive.grip.bg.colorTo: rgb:30/40/50
window.active.button.toggled.bg: raised gradient diagonal
window.active.button.toggled.bg.color: rgb:90/94/98
window.active.button.toggled.bg.colorTo: rgb:20/24/28
window.active.button.toggled.image.color: white
window.inactive.button.toggled.bg: raised gradient diagonal
window.inactive.button.toggled.bg.color: rgb:50/54/58
window.inactive.button.toggled.bg.colorTo: black
window.inactive.button.toggled.image.color: rgb:70/74/78
window.active.button.disabled.bg: raised gradient diagonal
window.active.button.disabled.bg.color: rgb:90/94/98
window.active.button.disabled.bg.colorTo: rgb:20/24/28
window.active.button.disabled.image.color: grey
window.inactive.button.disabled.bg: raised gradient diagonal
window.inactive.button.disabled.bg.color: rgb:50/54/58
window.inactive.button.disabled.bg.colorTo: black
window.inactive.button.disabled.image.color: rgb:70/74/78
border.color: black
padding.width: 1
borderWidth: 1
window.handle.width: 4
window.active.label.text.font: sans:pixelsize=10
menu.title.text.font: sans:pixelsize=10
menu.items.font: sans:pixelsize=10

View file

@ -0,0 +1,148 @@
<?xml version="1.0"?>
<openbox_theme version="1" xmlns="http://openbox.org/themerc">
<dimensions>
<handle>4</handle>
<padding horizontal="1" vertical="1"/>
</dimensions>
<window>
<border>
<width>1</width>
<primary r="0" g="0" b="0" a="255"/>
</border>
<justify>center</justify>
<active>
<clientpadding r="64" g="68" b="72" a="255"/>
<label>
<text>
<primary r="255" g="255" b="255" a="255"/>
</text>
<style>sunken diagonal gradient</style>
<primary r="16" g="32" b="48" a="255"/>
<secondary r="112" g="128" b="144" a="255"/>
</label>
<buttons>
<unpressed>
<image r="255" g="255" b="255" a="255"/>
<style>raised gradient diagonal</style>
<primary r="144" g="148" b="152" a="255"/>
<secondary r="32" g="36" b="40" a="255"/>
</unpressed>
<disabled>
<image r="190" g="190" b="190" a="255"/>
<style>raised gradient diagonal</style>
<primary r="144" g="148" b="152" a="255"/>
<secondary r="32" g="36" b="40" a="255"/>
</disabled>
<toggled>
<image r="255" g="255" b="255" a="255"/>
<style>raised gradient diagonal</style>
<primary r="144" g="148" b="152" a="255"/>
<secondary r="32" g="36" b="40" a="255"/>
</toggled>
<pressed>
<style>sunken gradient diagonal</style>
<primary r="32" g="64" b="80" a="255"/>
<secondary r="96" g="112" b="128" a="255"/>
</pressed>
</buttons>
<titlebar>
<style>raised gradient vertical</style>
<primary r="128" g="132" b="136" a="255"/>
<secondary r="48" g="52" b="56" a="255"/>
</titlebar>
<handle>
<style>raised gradient diagonal</style>
<primary r="112" g="116" b="120" a="255"/>
<secondary r="64" g="68" b="72" a="255"/>
</handle>
<grip>
<style>sunken diagonal gradient</style>
<primary r="32" g="48" b="64" a="255"/>
<secondary r="96" g="112" b="128" a="255"/>
</grip>
</active>
<inactive>
<clientpadding r="32" g="36" b="40" a="255"/>
<label>
<text>
<primary r="96" g="100" b="104" a="255"/>
</text>
<style>sunken gradient diagonal</style>
<primary r="0" g="0" b="0" a="255"/>
<secondary r="64" g="80" b="96" a="255"/>
</label>
<buttons>
<unpressed>
<image r="112" g="116" b="120" a="255"/>
<style>raised gradient diagonal</style>
<primary r="80" g="84" b="88" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
</unpressed>
<pressed>
<image r="112" g="116" b="120" a="255"/>
<style>sunken gradient diagonal</style>
<primary r="80" g="84" b="88" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
</pressed>
<disabled>
<image r="112" g="116" b="120" a="255"/>
<style>raised gradient diagonal</style>
<primary r="80" g="84" b="88" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
</disabled>
<toggled>
<image r="112" g="116" b="120" a="255"/>
<style>raised gradient diagonal</style>
<primary r="80" g="84" b="88" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
</toggled>
</buttons>
<titlebar>
<style>raised vertical gradient</style>
<primary r="80" g="84" b="88" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
</titlebar>
<handle>
<style>raised gradient diagonal</style>
<primary r="80" g="84" b="88" a="255"/>
<secondary r="0" g="0" b="0" a="255"/>
</handle>
<grip>
<style>sunken diagonal gradient</style>
<primary r="0" g="0" b="0" a="255"/>
<secondary r="48" g="64" b="80" a="255"/>
</grip>
</inactive>
</window>
<menu>
<border>
<width>1</width>
<primary r="0" g="0" b="0" a="255"/>
</border>
<justify>center</justify>
<title>
<text>
<primary r="255" g="255" b="255" a="255"/>
</text>
<style>raised gradient diagonal</style>
<primary r="144" g="148" b="152" a="255"/>
<secondary r="32" g="36" b="40" a="255"/>
</title>
<inactive>
<primary r="144" g="160" b="176" a="255"/>
</inactive>
<active>
<text>
<primary r="255" g="255" b="255" a="255"/>
</text>
<style>raised gradient diagonal</style>
<primary r="144" g="148" b="152" a="255"/>
<secondary r="32" g="36" b="40" a="255"/>
</active>
<entries>
<style>sunken gradient diagonal</style>
<primary r="16" g="32" b="48" a="255"/>
<secondary r="112" g="128" b="144" a="255"/>
</entries>
</menu>
</openbox_theme>

View file

@ -1,78 +0,0 @@
!!General
window.handle.width: 4
window.client.padding.width: 0
border.Width: 1
padding.width: 3
menu.overlap: 2
border.color: #4e4e4e
window.frameColor: #eeeeec
window.*.client.color: #eeeeec
*.text.justify: center
!!Fonts
window.active.label.text.font: sans:pixelsize=12:shadow=y:shadowoffset=1:shadowtint=3:bold
window.inactive.label.text.font: sans:pixelsize=12:shadow=y:shadowoffset=1:shadowtint=0:bold
menu.items.font: sans:pixelsize=12
menu.title.text.font: sans:pixelsize=12:shadow=y:shadowoffset=1:shadowtint=30:bold
!!Menu
menu.border.color: #9d9d9d
menu.title.bg: flat border vertical gradient
menu.title.bg.color: #3465A4
menu.title.bg.colorTo: #407CCA
menu.title.bg.border.color: #729fcf
menu.title.text.color: #ffffff
menu.items.bg: flat border solid
menu.items.bg.color: #eeeeec
menu.items.bg.border.color: #EFEBE7
menu.items.text.color: #444444
menu.items.disabled.text.color: #babdb6
menu.items.active.bg: flat solid
menu.items.active.bg.color: #4481c0
menu.items.active.bg.colorTo: #4175aa
menu.items.active.text.color: #f6f8fb
menu.items.active.bg.border.color: #416c98
!!Active
window.active.title.bg: flat border gradient mirrorhorizontal
window.active.title.bg.color: #3465A4
window.active.title.bg.colorTo: #407CCA
window.active.title.bg.border.color: #699acd
window.active.label.bg: parentrelative
window.active.label.text.color: #ffffff
window.active.button.*.bg: parentrelative
window.active.button.*.image.color: #efefef
window.active.button.hover.bg.color: #729fcf
window.active.button.hover.image.color: #ffffff
window.active.button.pressed.bg.color: #a7cef2
window.active.button.disabled.image.color: #dddddd
window.active.handle.bg: raised solid
window.active.handle.bg.color: #E7e7e7
window.*.grip.bg: parentrelative
!!Inactive
window.inactive.title.bg: flat border gradient mirrorhorizontal
window.inactive.title.bg.color: #dcdcdc
window.inactive.title.bg.colorTo: #eeeeec
window.inactive.title.bg.border.color: #efefef
window.inactive.label.bg: parentrelative
window.inactive.label.text.color: #888a85
window.inactive.button.*.bg: parentrelative
window.inactive.button.*.image.color: #888a85
window.inactive.button.pressed.bg.color: #d3d7cf
window.inactive.button.pressed.bg.color: #4f5051
window.inactive.button.disabled.image.color: #ffffff
window.inactive.handle.bg: raised solid
window.inactive.handle.bg.color: #E7e7e7

View file

@ -0,0 +1,155 @@
<?xml version="1.0"?>
<openbox_theme version="1" xmlns="http://openbox.org/themerc">
<dimensions>
<handle>4</handle>
<padding horizontal="3" vertical="3"/>
</dimensions>
<window>
<border>
<width>1</width>
<primary r="78" g="78" b="78" a="255"/>
</border>
<clientpadding horizontal="0" vertical="0"/>
<justify>center</justify>
<active>
<clientpadding r="238" g="238" b="236" a="255"/>
<label>
<text>
<primary r="255" g="255" b="255" a="255"/>
<shadow>
<offset x="1" y="1"/>
<primary r="0" g="0" b="0" a="3"/>
</shadow>
</text>
<style>parentrelative</style>
</label>
<buttons>
<unpressed>
<image r="239" g="239" b="239" a="255"/>
<style>parentrelative</style>
</unpressed>
<pressed>
<image r="239" g="239" b="239" a="255"/>
<style>parentrelative</style>
<primary r="167" g="206" b="242" a="255"/>
</pressed>
<disabled>
<image r="221" g="221" b="221" a="255"/>
<style>parentrelative</style>
</disabled>
<hover>
<image r="255" g="255" b="255" a="255"/>
<style>parentrelative</style>
<primary r="114" g="159" b="207" a="255"/>
</hover>
<toggled>
<image r="239" g="239" b="239" a="255"/>
<style>parentrelative</style>
</toggled>
</buttons>
<titlebar>
<style>flat border gradient mirrorhorizontal</style>
<primary r="52" g="101" b="164" a="255"/>
<secondary r="64" g="124" b="202" a="255"/>
<border r="105" g="154" b="205" a="255"/>
</titlebar>
<handle>
<style>raised solid</style>
<primary r="231" g="231" b="231" a="255"/>
</handle>
<grip>
<style>parentrelative</style>
</grip>
</active>
<inactive>
<clientpadding r="238" g="238" b="236" a="255"/>
<label>
<text>
<primary r="136" g="138" b="133" a="255"/>
<shadow>
<offset x="1" y="1"/>
<primary r="255" g="255" b="255" a="0"/>
</shadow>
</text>
<style>parentrelative</style>
</label>
<buttons>
<unpressed>
<image r="136" g="138" b="133" a="255"/>
<style>parentrelative</style>
</unpressed>
<pressed>
<image r="136" g="138" b="133" a="255"/>
<style>parentrelative</style>
<primary r="79" g="80" b="81" a="255"/>
</pressed>
<disabled>
<image r="255" g="255" b="255" a="255"/>
<style>parentrelative</style>
</disabled>
<hover>
<image r="136" g="138" b="133" a="255"/>
<style>parentrelative</style>
</hover>
<toggled>
<image r="136" g="138" b="133" a="255"/>
<style>parentrelative</style>
</toggled>
</buttons>
<titlebar>
<style>flat border gradient mirrorhorizontal</style>
<primary r="220" g="220" b="220" a="255"/>
<secondary r="238" g="238" b="236" a="255"/>
<border r="239" g="239" b="239" a="255"/>
</titlebar>
<handle>
<style>raised solid</style>
<primary r="231" g="231" b="231" a="255"/>
</handle>
<grip>
<style>parentrelative</style>
</grip>
</inactive>
</window>
<menu>
<border>
<width>1</width>
<primary r="78" g="78" b="78" a="255"/>
</border>
<justify>center</justify>
<overlap>2</overlap>
<title>
<text>
<primary r="255" g="255" b="255" a="255"/>
<shadow>
<offset x="1" y="1"/>
<primary r="0" g="0" b="0" a="30"/>
</shadow>
</text>
<style>flat border vertical gradient</style>
<primary r="52" g="101" b="164" a="255"/>
<secondary r="64" g="124" b="202" a="255"/>
<border r="114" g="159" b="207" a="255"/>
</title>
<inactive>
<primary r="68" g="68" b="68" a="255"/>
</inactive>
<disabled>
<primary r="186" g="189" b="182" a="255"/>
</disabled>
<active>
<text>
<primary r="246" g="248" b="251" a="255"/>
</text>
<style>flat solid</style>
<primary r="68" g="129" b="192" a="255"/>
<secondary r="65" g="117" b="170" a="255"/>
<border r="65" g="108" b="152" a="255"/>
</active>
<entries>
<style>flat border solid</style>
<primary r="238" g="238" b="236" a="255"/>
<border r="239" g="235" b="231" a="255"/>
</entries>
</menu>
</openbox_theme>

View file

@ -1,100 +0,0 @@
!! i be a mess
menu.title.bg: flat solid border
menu.title.bg.color: #ce5c00
menu.title.bg.border.color: #fcaf3e
menu.title.text.color: #ffffff
menu.items.bg: flat solid
#menu.items.bg.color: #ffffff
menu.items.bg.color: #d3d7cf
menu.items.text.color: #000000
menu.items.disabled.text.color: #737573
menu.items.active.bg: flat solid
menu.items.active.bg.color: #ce5c00
menu.items.active.text.color: #ffffff
!! General window settings
*.justify: left
!! focused window settings
window.active.client.color: #f7f7f7
window.active.title.bg: flat border solid
window.active.title.bg.color: #ce5c00
window.active.title.bg.border.color: #fcaf3e
window.active.handle.bg: flat solid border
window.active.handle.bg.color: #d3d7cf
window.active.handle.bg.border.color: #eeeeec
!window.active.handle.bg.color: #969494
window.active.grip.bg: parentrelative
window.active.label.bg: parentrelative
window.active.label.text.color: #ffffff
window.active.button.*.bg: parentrelative
window.active.button.*.image.color: #ffffff
window.active.button.pressed.bg: flat solid bevel1
!window.active.button.pressed.bg.color: #888888
window.active.button.pressed.bg.color: #f57900
window.active.button.pressed.image.color: #d3d7cf
!#hover
window.active.button.hover.bg: flat solid
window.active.button.hover.image.color: #ffffff
window.active.button.hover.bg.color: #fcaf3e
window.active.button.disabled.bg: flat solid
window.active.button.disabled.bg.color: #dfb454
window.active.button.disabled.image.color: #ffffff
!! unfocused window settings
window.inactive.client.color: #f7f7f7
window.inactive.title.bg: flat solid border
window.inactive.title.bg.color: #d3d7cf
window.inactive.title.bg.border.color: #dfe3db
window.inactive.handle.bg: flat solid
window.inactive.handle.bg.color: #d3d7cf
window.inactive.grip.bg: parentrelative
window.inactive.label.bg: parentrelative
window.inactive.label.text.color: #888a85
window.inactive.button.*.bg: parentrelative
window.inactive.button.unpressed.image.color: #555555
window.inactive.button.pressed.bg: flat border solid
window.inactive.button.pressed.bg.color: #aaaaaa
window.inactive.button.pressed.bg.border.color: #e5e5e5
window.inactive.button.hover.bg: flat solid
window.inactive.button.hover.bg.color: #e3e3e3
window.inactive.button.disabled.bg:flat solid
window.inactive.button.disabled.bg.color: #e3e3e3
!! Global width settings
border.Width: 1
padding.width: 1
window.handle.width: 3
window.client.padding.width: 0
menu.overlap: 2
!! Miscellaneous settings
border.color: #000000
!! font me!
window.active.label.text.font: sans:pixelsize=10:bold
window.inactive.label.text.font: sans:pixelsize=10:bold
menu.title.text.font: sans:pixelsize=10:bold
menu.items.font: sans:pixelsize=9

View file

@ -0,0 +1,140 @@
<!-- i be a mess -->
<?xml version="1.0"?>
<openbox_theme version="1" xmlns="http://openbox.org/themerc">
<dimensions>
<handle>3</handle>
<padding horizontal="1" vertical="1"/>
</dimensions>
<window>
<border>
<width>1</width>
<primary r="0" g="0" b="0" a="255"/>
</border>
<clientpadding horizontal="0" vertical="0"/>
<justify>left</justify>
<active>
<clientpadding r="247" g="247" b="247" a="255"/>
<label>
<text>
<primary r="255" g="255" b="255" a="255"/>
</text>
<style>parentrelative</style>
</label>
<buttons>
<unpressed>
<image r="255" g="255" b="255" a="255"/>
<style>parentrelative</style>
</unpressed>
<pressed>
<image r="211" g="215" b="207" a="255"/>
<style>flat solid bevel1</style>
<primary r="245" g="121" b="0" a="255"/>
</pressed>
<disabled>
<image r="255" g="255" b="255" a="255"/>
<style>flat solid</style>
<primary r="223" g="180" b="84" a="255"/>
</disabled>
<hover>
<image r="255" g="255" b="255" a="255"/>
<style>flat solid</style>
<primary r="252" g="175" b="62" a="255"/>
</hover>
<toggled>
<image r="255" g="255" b="255" a="255"/>
<style>parentrelative</style>
</toggled>
</buttons>
<titlebar>
<style>flat border solid</style>
<primary r="206" g="92" b="0" a="255"/>
<border r="252" g="175" b="62" a="255"/>
</titlebar>
<handle>
<style>flat solid border</style>
<primary r="211" g="215" b="207" a="255"/>
<border r="238" g="238" b="236" a="255"/>
</handle>
<grip>
<style>parentrelative</style>
</grip>
</active>
<inactive>
<clientpadding r="247" g="247" b="247" a="255"/>
<label>
<text>
<primary r="136" g="138" b="133" a="255"/>
</text>
<style>parentrelative</style>
</label>
<buttons>
<unpressed>
<image r="85" g="85" b="85" a="255"/>
<style>parentrelative</style>
</unpressed>
<disabled>
<style>flat solid</style>
<primary r="227" g="227" b="227" a="255"/>
</disabled>
<pressed>
<style>flat border solid</style>
<primary r="170" g="170" b="170" a="255"/>
<border r="229" g="229" b="229" a="255"/>
</pressed>
<toggled>
<style>parentrelative</style>
</toggled>
<hover>
<style>flat solid</style>
<primary r="227" g="227" b="227" a="255"/>
</hover>
</buttons>
<titlebar>
<style>flat solid border</style>
<primary r="211" g="215" b="207" a="255"/>
<border r="223" g="227" b="219" a="255"/>
</titlebar>
<handle>
<style>flat solid</style>
<primary r="211" g="215" b="207" a="255"/>
</handle>
<grip>
<style>parentrelative</style>
</grip>
</inactive>
</window>
<menu>
<border>
<width>1</width>
<primary r="0" g="0" b="0" a="255"/>
</border>
<justify>left</justify>
<overlap>2</overlap>
<title>
<text>
<primary r="255" g="255" b="255" a="255"/>
</text>
<style>flat solid border</style>
<primary r="206" g="92" b="0" a="255"/>
<border r="252" g="175" b="62" a="255"/>
</title>
<inactive>
<primary r="0" g="0" b="0" a="255"/>
</inactive>
<disabled>
<primary r="115" g="117" b="115" a="255"/>
</disabled>
<active>
<text>
<primary r="255" g="255" b="255" a="255"/>
</text>
<style>flat solid</style>
<primary r="206" g="92" b="0" a="255"/>
</active>
<entries>
<style>flat solid</style>
<primary r="211" g="215" b="207" a="255"/>
</entries>
</menu>
</openbox_theme>

View file

@ -1,107 +0,0 @@
!! syscrash's theme, based off nightm4re's flax or something
!!---------------------------------------------------------------------------
!! Dimensions
border.width: 1
border.color: #22221c
padding.width: 2
window.handle.width: 3
window.client.padding.width: 0
menu.overlap: 0
!!---------------------------------------------------------------------------
!! Fonts
*.font: sans:pixelsize=11
window.label.text.justify: left
menu.title.text.justify: left
!!---------------------------------------------------------------------------
!! Menu Settings
menu.title.bg: flat gradient vertical
menu.title.bg.color: #4c4c4c
menu.title.bg.colorTo: #707070
menu.title.text.color: white
menu.items.bg: flat solid
menu.items.bg.color: #e6e6e0
menu.items.text.color: #22221c
menu.items.active.bg: flat solid
menu.items.active.bg.color: #4c4c4c
menu.items.active.text.color: #ffffff
menu.items.disabled.text.color: #444438
!!---------------------------------------------------------------------------
!! Window Settings
window.active.padding.width: 10
window.active.title.bg: flat solid
window.active.title.bg.color: #9b9b9b
window.active.label.bg: flat gradient vertical border
window.active.label.bg.color: #4c4c4c
window.active.label.bg.colorTo: #707070
window.active.label.text.color: white
window.active.handle.bg: flat solid
window.active.handle.bg.color: #9b9b9b
window.active.grip.bg: flat solid
window.active.grip.bg.color: #4c4c4c
window.active.grip.bg.colorTo: #707070
window.inactive.title.bg: flat solid
window.inactive.title.bg.color: #9b9b9b
window.inactive.label.bg: parentrelative
window.inactive.label.text.color: #4c4c4c
window.inactive.handle.bg: flat solid
window.inactive.handle.bg.color: #e6e6e0
window.inactive.grip.bg: flat solid
window.inactive.grip.bg.color: #e6e6e0
!!---------------------------------------------------------------------------
!! Button Settings
window.active.button.unpressed.bg: flat gradient vertical border
window.active.button.unpressed.bg.color: #515151
window.active.button.unpressed.bg.colorTo: #676767
window.active.button.unpressed.image.color: white
window.active.button.pressed.bg: flat gradient crossdiagonal border
window.active.button.pressed.bg.color: #d3deda
window.active.button.pressed.bg.colorTo: #9fbfc1
window.active.button.hover.bg: flat solid border
window.active.button.hover.bg.color: #e6e6e0
window.active.button.disabled.bg: parentrelative
window.active.button.disabled.image.color: #9fbfc1
!! without this it looks right
!!window.active.button.toggled.bg: flat solid
!!window.active.button.toggled.bg.color: #9fbfc1
window.inactive.button.unpressed.bg: parentrelative
window.inactive.button.unpressed.image.color: #4c4c4c
window.inactive.button.hover.bg: flat solid border
window.inactive.button.hover.bg.color: #e6e6e0
window.inactive.button.pressed.bg: flat gradient crossdiagonal border
window.inactive.button.pressed.bg.color: #d3deda
window.inactive.button.pressed.bg.colorTo: #9fbfc1
window.inactive.button.disabled.bg: flat solid
window.inactive.button.disabled.bg.image.color: #444438
!! window.inactive.button.toggled.bg: flat solid
!! window.inactive.button.toggled.bg.color: #444438

View file

@ -0,0 +1,131 @@
<!-- syscrash's theme, based off nightm4re's flax or something -->
<?xml version="1.0"?>
<openbox_theme version="1" xmlns="http://openbox.org/themerc">
<dimensions>
<handle>3</handle>
<padding horizontal="2" vertical="2"/>
</dimensions>
<window>
<border>
<width>1</width>
<primary r="34" g="34" b="28" a="255"/>
</border>
<clientpadding horizontal="0" vertical="0"/>
<justify>left</justify>
<active>
<label>
<text>
<primary r="255" g="255" b="255" a="255"/>
</text>
<style>flat gradient vertical border</style>
<primary r="76" g="76" b="76" a="255"/>
<secondary r="112" g="112" b="112" a="255"/>
</label>
<buttons>
<unpressed>
<image r="255" g="255" b="255" a="255"/>
<style>flat gradient vertical border</style>
<primary r="81" g="81" b="81" a="255"/>
<secondary r="103" g="103" b="103" a="255"/>
</unpressed>
<disabled>
<image r="159" g="191" b="193" a="255"/>
<style>parentrelative</style>
</disabled>
<pressed>
<style>flat gradient crossdiagonal border</style>
<primary r="211" g="222" b="218" a="255"/>
<secondary r="159" g="191" b="193" a="255"/>
</pressed>
<hover>
<style>flat solid border</style>
<primary r="230" g="230" b="224" a="255"/>
</hover>
</buttons>
<titlebar>
<style>flat solid</style>
<primary r="155" g="155" b="155" a="255"/>
</titlebar>
<handle>
<style>flat solid</style>
</handle>
<grip>
<style>flat solid</style>
<primary r="76" g="76" b="76" a="255"/>
<secondary r="112" g="112" b="112" a="255"/>
</grip>
</active>
<inactive>
<label>
<text>
<primary r="76" g="76" b="76" a="255"/>
</text>
<style>parentrelative</style>
</label>
<buttons>
<unpressed>
<image r="76" g="76" b="76" a="255"/>
<style>parentrelative</style>
</unpressed>
<disabled>
<style>flat solid</style>
</disabled>
<pressed>
<style>flat gradient crossdiagonal border</style>
<primary r="211" g="222" b="218" a="255"/>
<secondary r="159" g="191" b="193" a="255"/>
</pressed>
<hover>
<style>flat solid border</style>
<primary r="230" g="230" b="224" a="255"/>
</hover>
</buttons>
<titlebar>
<style>flat solid</style>
<primary r="155" g="155" b="155" a="255"/>
</titlebar>
<handle>
<style>flat solid</style>
<primary r="230" g="230" b="224" a="255"/>
</handle>
<grip>
<style>flat solid</style>
<primary r="230" g="230" b="224" a="255"/>
</grip>
</inactive>
</window>
<menu>
<border>
<width>1</width>
<primary r="34" g="34" b="28" a="255"/>
</border>
<justify>left</justify>
<overlap>0</overlap>
<title>
<text>
<primary r="255" g="255" b="255" a="255"/>
</text>
<style>flat gradient vertical</style>
<primary r="76" g="76" b="76" a="255"/>
<secondary r="112" g="112" b="112" a="255"/>
</title>
<inactive>
<primary r="34" g="34" b="28" a="255"/>
</inactive>
<disabled>
<primary r="68" g="68" b="56" a="255"/>
</disabled>
<active>
<text>
<primary r="255" g="255" b="255" a="255"/>
</text>
<style>flat solid</style>
<primary r="76" g="76" b="76" a="255"/>
</active>
<entries>
<style>flat solid</style>
<primary r="230" g="230" b="224" a="255"/>
</entries>
</menu>
</openbox_theme>

View file

@ -99,8 +99,8 @@ static gboolean read_string(XrmDatabase db, gchar *rname, gchar **value)
static gchar hextodec(gchar h)
{
if (h >= '0' && h <= '9') return h - '0';
else if (h >= 'a' && h <= 'f') return h - 'a' + 9;
else if (h >= 'A' && h <= 'F') return h - 'A' + 9;
else if (h >= 'a' && h <= 'f') return h - 'a' + 10;
else if (h >= 'A' && h <= 'F') return h - 'A' + 10;
return -1;
}
@ -109,9 +109,33 @@ static gboolean parse_color(gchar *c, gint *r, gint *g, gint *b)
int dig1, dig2, i, color[3];
int len = strlen(c);
if (c[0] == '#' && (len != 4 && len != 7)) return FALSE;
if (len > 4 && c[0] == 'r' && c[1] == 'g' && c[2] == 'b' && c[3] == ':') {
c += 4;
for (i = 0; i < 3; ++i) {
dig1 = hextodec(c[0]);
if (c[1] == '/') { dig2 = dig1; c+=2; }
else { dig2 = hextodec(c[1]); c+=3; }
if (c[0] != '#') {
if (dig1 < 0 || dig2 < 0) return FALSE;
color[i] = dig1*16 + dig2;
}
*r = color[0]; *g = color[1]; *b = color[2];
return TRUE;
} else if ((len == 4 || len == 7) && c[0] == '#') {
c++;
for (i = 0; i < 3; ++i) {
dig1 = hextodec(c[0]);
if (len == 4) { dig2 = dig1; c++; }
else { dig2 = hextodec(c[1]); c+=2; }
if (dig1 < 0 || dig2 < 0) return FALSE;
color[i] = dig1*16 + dig2;
}
*r = color[0]; *g = color[1]; *b = color[2];
return TRUE;
} else {
int i;
for (i = 0; colornames[i].name != NULL; ++i) {
@ -122,21 +146,8 @@ static gboolean parse_color(gchar *c, gint *r, gint *g, gint *b)
return TRUE;
}
}
}
return FALSE;
}
c++;
for (i = 0; i < 3; ++i, c += (len == 4 ? 1 : 2)) {
dig2 = hextodec(c[1]);
if (len == 4) dig1 = dig2;
else dig1 = hextodec(c[0]);
if (dig1 < 0 || dig2 < 0) return FALSE;
color[i] = dig1*16 + dig2;
}
*r = color[0]; *g = color[1]; *b = color[2];
return TRUE;
}
static gboolean read_color(XrmDatabase db, gchar *rname,
@ -197,48 +208,35 @@ static xmlNodePtr root;
#define ATTR6(a,b,c,d,e,f,name,cont) (xmlSetProp(GO6(a,b,c,d,e,f), (const xmlChar*)name, (const xmlChar*)cont))
#define ATTR7(a,b,c,d,e,f,g,name,cont) (xmlSetProp(GO7(a,b,c,d,e,f,g), (const xmlChar*)name, (const xmlChar*)cont))
#define APPCONT1(a,cont) (CONT2("appearance",a,cont))
#define APPCONT2(a,b,cont) (CONT3("appearance",a,b,cont))
#define APPCONT3(a,b,c,cont) (CONT4("appearance",a,b,c,cont))
#define APPCONT4(a,b,c,d,cont) (CONT5("appearance",a,b,c,d,cont))
#define APPCONT5(a,b,c,d,e,cont) (CONT6("appearance",a,b,c,d,e,cont))
#define APPATTR1(a,name,cont) (ATTR2("appearance",a,name,cont))
#define APPATTR2(a,b,name,cont) (ATTR3("appearance",a,b,name,cont))
#define APPATTR3(a,b,c,name,cont) (ATTR4("appearance",a,b,c,name,cont))
#define APPATTR4(a,b,c,d,name,cont) (ATTR5("appearance",a,b,c,d,name,cont))
#define APPATTR5(a,b,c,d,e,name,cont) (ATTR6("appearance",a,b,c,d,e,name,cont))
#define APPATTR6(a,b,c,d,e,f,name,cont) (ATTR7("appearance",a,b,c,d,e,f,name,cont))
#define COLOR1(a,R,G,B,A) (APPATTR1(a,"r",NUM(R)), \
APPATTR1(a,"g",NUM(G)), \
APPATTR1(a,"b",NUM(B)), \
APPATTR1(a,"a",NUM(A)))
#define COLOR2(a,b,R,G,B,A) (APPATTR2(a,b,"r",NUM(R)), \
APPATTR2(a,b,"g",NUM(G)), \
APPATTR2(a,b,"b",NUM(B)), \
APPATTR2(a,b,"a",NUM(A)))
#define COLOR3(a,b,c,R,G,B,A) (APPATTR3(a,b,c,"r",NUM(R)), \
APPATTR3(a,b,c,"g",NUM(G)), \
APPATTR3(a,b,c,"b",NUM(B)), \
APPATTR3(a,b,c,"a",NUM(A)))
#define COLOR4(a,b,c,d,R,G,B,A) (APPATTR4(a,b,c,d,"r",NUM(R)), \
APPATTR4(a,b,c,d,"g",NUM(G)), \
APPATTR4(a,b,c,d,"b",NUM(B)), \
APPATTR4(a,b,c,d,"a",NUM(A)))
#define COLOR5(a,b,c,d,e,R,G,B,A) (APPATTR5(a,b,c,d,e,"r",NUM(R)), \
APPATTR5(a,b,c,d,e,"g",NUM(G)), \
APPATTR5(a,b,c,d,e,"b",NUM(B)), \
APPATTR5(a,b,c,d,e,"a",NUM(A)))
#define COLOR6(a,b,c,d,e,f,R,G,B,A) (APPATTR6(a,b,c,d,e,f,"r",NUM(R)), \
APPATTR6(a,b,c,d,e,f,"g",NUM(G)), \
APPATTR6(a,b,c,d,e,f,"b",NUM(B)), \
APPATTR6(a,b,c,d,e,f,"a",NUM(A)))
#define COLOR1(a,R,G,B,A) (ATTR1(a,"r",NUM(R)), \
ATTR1(a,"g",NUM(G)), \
ATTR1(a,"b",NUM(B)), \
ATTR1(a,"a",NUM(A)))
#define COLOR2(a,b,R,G,B,A) (ATTR2(a,b,"r",NUM(R)), \
ATTR2(a,b,"g",NUM(G)), \
ATTR2(a,b,"b",NUM(B)), \
ATTR2(a,b,"a",NUM(A)))
#define COLOR3(a,b,c,R,G,B,A) (ATTR3(a,b,c,"r",NUM(R)), \
ATTR3(a,b,c,"g",NUM(G)), \
ATTR3(a,b,c,"b",NUM(B)), \
ATTR3(a,b,c,"a",NUM(A)))
#define COLOR4(a,b,c,d,R,G,B,A) (ATTR4(a,b,c,d,"r",NUM(R)), \
ATTR4(a,b,c,d,"g",NUM(G)), \
ATTR4(a,b,c,d,"b",NUM(B)), \
ATTR4(a,b,c,d,"a",NUM(A)))
#define COLOR5(a,b,c,d,e,R,G,B,A) (ATTR5(a,b,c,d,e,"r",NUM(R)), \
ATTR5(a,b,c,d,e,"g",NUM(G)), \
ATTR5(a,b,c,d,e,"b",NUM(B)), \
ATTR5(a,b,c,d,e,"a",NUM(A)))
#define COLOR6(a,b,c,d,e,f,R,G,B,A) (ATTR6(a,b,c,d,e,f,"r",NUM(R)), \
ATTR6(a,b,c,d,e,f,"g",NUM(G)), \
ATTR6(a,b,c,d,e,f,"b",NUM(B)), \
ATTR6(a,b,c,d,e,f,"a",NUM(A)))
#define APPEARANCE2(res,a,b) \
{ \
if (read_string(db, res, &s)) \
APPCONT3(a, b, "style", s); \
CONT3(a, b, "style", s); \
if (read_color(db, res".color", &i, &j, &k)) \
COLOR3(a, b, "primary", i, j, k, 255); \
if (read_color(db, res".colorTo", &i, &j, &k)) \
@ -252,7 +250,7 @@ static xmlNodePtr root;
#define APPEARANCE3(res,a,b,c) \
{ \
if (read_string(db, res, &s)) \
APPCONT4(a, b, c, "style", s); \
CONT4(a, b, c, "style", s); \
if (read_color(db, res".color", &i, &j, &k)) \
COLOR4(a, b, c, "primary", i, j, k, 255); \
if (read_color(db, res".colorTo", &i, &j, &k)) \
@ -266,7 +264,7 @@ static xmlNodePtr root;
#define APPEARANCE4(res,a,b,c,d) \
{ \
if (read_string(db, res, &s)) \
APPCONT5(a, b, c, d, "style", s); \
CONT5(a, b, c, d, "style", s); \
if (read_color(db, res".color", &i, &j, &k)) \
COLOR5(a, b, c, d, "primary", i, j, k, 255); \
if (read_color(db, res".colorTo", &i, &j, &k)) \
@ -284,19 +282,40 @@ int main(int argc, char **argv)
gchar *s;
int ret = 0;
if (argc < 2) {
printf("Please specify an Openbox3 themerc file\n");
return 1;
if (argc > 1) {
fprintf(stderr, "themetoxml (C) 2007 Dana Jansens\n"
"This tool takes an older Openbox3 themerc file on stdin,"
" and gives back the\n"
"theme in the newer themerc.xml XML style.\n");
return 0;
}
{
gchar *buf = g_new(gchar, 1000);
gint sz = 1000;
gint r = 0, rthis;
while ((rthis = read(0, buf + r, sz - r)) > 0) {
r+=rthis;
if (r==sz) {
sz+=1000;
buf = g_renew(gchar,buf,sz);
}
}
if ((db = XrmGetFileDatabase(argv[1])) == NULL) {
printf("Unable to open the database from stdin\n");
if ((db = XrmGetStringDatabase(buf)) == NULL) {
fprintf(stderr, "Unable to read the database from stdin\n");
return 1;
}
g_free(buf);
}
doc = xmlNewDoc((const xmlChar*) "1.0");
xmlDocSetRootElement
(doc,(root = xmlNewNode(NULL, (const xmlChar*)"openbox_theme")));
xmlSetProp(root, (const xmlChar*)"version", (const xmlChar*)"1");
xmlSetProp(root, (const xmlChar*)"xmlns",
(const xmlChar*)"http://openbox.org/themerc");
if (read_int(db, "window.handle.width", &i))
CONT2("dimensions", "handle", NUM(i));
@ -306,9 +325,12 @@ int main(int argc, char **argv)
ATTR2("dimensions", "padding", "vertical", NUM(i));
}
if (read_int(db, "border.width", &i)) {
APPCONT3("window", "border", "width", NUM(i));
APPCONT3("menu", "border", "width", NUM(i));
if (read_int(db, "borderWidth", &i)) {
CONT3("window", "border", "width", NUM(i));
CONT3("menu", "border", "width", NUM(i));
} else if (read_int(db, "border.width", &i)) {
CONT3("window", "border", "width", NUM(i));
CONT3("menu", "border", "width", NUM(i));
}
if (read_color(db, "border.color", &i, &j, &k)) {
@ -316,31 +338,33 @@ int main(int argc, char **argv)
COLOR3("menu", "border", "primary", i, j, k, 255);
}
if (read_int(db, "window.client.padding.width", &i))
APPCONT3("window", "clientborder", "width", NUM(i));
if (read_int(db, "window.client.padding.width", &i)) {
ATTR2("window", "clientpadding", "horizontal", NUM(i));
ATTR2("window", "clientpadding", "vertical", NUM(i));
}
if (read_string(db, "window.label.text.justify", &s)) {
if (!g_ascii_strcasecmp(s, "right")) s = "right";
else if (!g_ascii_strcasecmp(s, "center")) s = "center";
else s = "left";
APPCONT5("window", "inactive", "label", "text", "justify", s);
CONT2("window", "justify", s);
}
if (read_string(db, "menu.title.text.justify", &s)) {
if (!g_ascii_strcasecmp(s, "right")) s = "right";
else if (!g_ascii_strcasecmp(s, "center")) s = "center";
else s = "left";
APPCONT4("menu", "title", "text", "justify", s);
CONT2("menu", "justify", s);
}
if (read_int(db, "menu.overlap", &i))
APPCONT2("menu", "overlap", NUM(i));
CONT2("menu", "overlap", NUM(i));
if (read_color(db, "window.active.client.color", &i, &j, &k))
COLOR4("window","active","clientborder","primary",i,j,k,255);
COLOR3("window","active","clientpadding",i,j,k,255);
if (read_color(db, "window.inactive.client.color", &i, &j, &k))
COLOR4("window","inactive","clientborder","primary",i,j,k,255);
COLOR3("window","inactive","clientpadding",i,j,k,255);
if (read_color(db, "window.active.label.text.color", &i, &j, &k))
COLOR5("window","active","label","text","primary",i,j,k,255);
@ -394,7 +418,7 @@ int main(int argc, char **argv)
if (read_color(db, "menu.items.text.color",
&i, &j, &k))
COLOR4("menu","inactive","text","primary",i,j,k,255);
COLOR3("menu","inactive","primary",i,j,k,255);
if (read_color(db, "menu.items.disabled.text.color",
&i, &j, &k))
@ -412,7 +436,7 @@ int main(int argc, char **argv)
APPEARANCE3("window.inactive.handle.bg", "window", "inactive", "handle");
APPEARANCE3("window.active.grip.bg", "window", "active", "grip");
APPEARANCE3("window.inactive.grip.bg", "window", "inactive", "grip");
APPEARANCE2("menu.items.bg", "menu", "inactive");
APPEARANCE2("menu.items.bg", "menu", "entries");
APPEARANCE2("menu.items.active.bg", "menu", "active");
APPEARANCE2("menu.title.bg", "menu", "title");
@ -444,9 +468,9 @@ int main(int argc, char **argv)
i = parse_inline_number(p + strlen("shadowoffset="));
else
i = 1;
APPATTR6("window","active","label","text","shadow","offset",
ATTR6("window","active","label","text","shadow","offset",
"x",NUM(i));
APPATTR6("window","active","label","text","shadow","offset",
ATTR6("window","active","label","text","shadow","offset",
"y",NUM(i));
}
if ((p = strstr(s, "shadowtint=")))
@ -466,9 +490,9 @@ int main(int argc, char **argv)
i = parse_inline_number(p + strlen("shadowoffset="));
else
i = 1;
APPATTR6("window","inactive","label","text","shadow","offset",
ATTR6("window","inactive","label","text","shadow","offset",
"x",NUM(i));
APPATTR6("window","inactive","label","text","shadow","offset",
ATTR6("window","inactive","label","text","shadow","offset",
"y",NUM(i));
}
if ((p = strstr(s, "shadowtint=")))
@ -488,8 +512,8 @@ int main(int argc, char **argv)
i = parse_inline_number(p + strlen("shadowoffset="));
else
i = 1;
APPATTR5("menu","title","text","shadow","offset","x",NUM(i));
APPATTR5("menu","title","text","shadow","offset","y",NUM(i));
ATTR5("menu","title","text","shadow","offset","x",NUM(i));
ATTR5("menu","title","text","shadow","offset","y",NUM(i));
}
if ((p = strstr(s, "shadowtint=")))
{
@ -507,26 +531,26 @@ int main(int argc, char **argv)
i = parse_inline_number(p + strlen("shadowoffset="));
else
i = 1;
APPATTR5("menu","inactive","text","shadow","offset","x",NUM(i));
APPATTR5("menu","inactive","text","shadow","offset","y",NUM(i));
APPATTR5("menu","active","text","shadow","offset","x",NUM(i));
APPATTR5("menu","active","text","shadow","offset","y",NUM(i));
APPATTR5("menu","disabled","text","shadow","offset","x",NUM(i));
APPATTR5("menu","disabled","text","shadow","offset","y",NUM(i));
ATTR4("menu","inactive","shadow","offset","x",NUM(i));
ATTR4("menu","inactive","shadow","offset","y",NUM(i));
ATTR5("menu","active","text","shadow","offset","x",NUM(i));
ATTR5("menu","active","text","shadow","offset","y",NUM(i));
ATTR4("menu","disabled","shadow","offset","x",NUM(i));
ATTR4("menu","disabled","shadow","offset","y",NUM(i));
}
if ((p = strstr(s, "shadowtint=")))
{
i = parse_inline_number(p + strlen("shadowtint="));
j = (i > 0 ? 0 : 255);
i = ABS(i);
COLOR5("menu","inactive","text","shadow","primary",j,j,j,i);
COLOR4("menu","inactive","shadow","primary",j,j,j,i);
COLOR5("menu","active","text","shadow","primary",j,j,j,i);
COLOR5("menu","disabled","text","shadow","primary",j,j,j,i);
COLOR4("menu","disabled","shadow","primary",j,j,j,i);
}
}
if (xmlSaveFormatFile("-", doc, 1) < 0) {
printf("Error writing the xml tree\n");
fprintf(stderr, "Error writing the xml tree\n");
ret = 1;
}