Commit graph

90 commits

Author SHA1 Message Date
Dana Jansens
ec304c9e43 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>
2007-03-05 15:44:17 +00:00
Dana Jansens
7744067b6b moving shadow information out of the themes, and into the Text textures.
cleaning up some old Xft cruft in font.c also, that is no longer needed.
2007-03-04 18:47:21 +00:00
Dana Jansens
d0f9d647aa remove the font code for parsing Xft font strings. we are using the individual values specified in the user's configuration now, no longer using the strings from the theme file at all 2007-03-04 07:14:25 +00:00
Dana Jansens
43d0f79057 fonts are no longer loaded from the theme file. instead, they are created by the application and passed in while creating/loading a theme 2007-03-04 07:12:34 +00:00
Dana Jansens
ac6fe98008 use font 8point by default if none is specified 2007-03-04 01:08:33 +00:00
Dana Jansens
41e272bd27 add missing comment 2007-03-04 00:47:26 +00:00
Dana Jansens
037fc862b0 pango is now mandatory..
lots of cleanups to the pango code, which was a very nice base to start from. thanks to whomever wrote that for us.. put some of the pango variables into the various render structs so that they don't need to be created all the time. put the pango context inside our RrInstance so that it can be properly freed at shutdown. removed xft dependencies all through the code and the build system also. who knows if this will break compiling for some poor souls. i guess we'll find out, won't we!
2007-03-03 02:53:41 +00:00
Dana Jansens
78af5d15e9 this includes a number of things since my magnificent return....
1. some random compiling/style cleanups
2. some bigfixes
 - mislogic in per-window-settings and focusing new windows
 - use client_can_focus rather than checking variables for directional focus
 - MAYBE fix all those lock-ups forever. using event_curtime (a new variable) now instead of event_lasttime. event_lasttime is still used however when the event being processed did not have a time associated with it. this may or may not be a problem, and will be seen.
3. um.. i forget
4. oh yeah, 3rd party docks are now treated like the internal ob dock irt focus. that is, clicking on them won't pass them focus. this is going to be ratified as expected behavior in the wm-spec just now. if docks/panels want focus they can request it with _net_active_window, and then they can have all the focus they want! one day alt-tabbing around dock windows might be nice. but not until the ob dock is moved out into a separate application. going to have to add a wmapp selection and stuff for that though... ugly. who uses wmdockapps anymore !? someone must.. *sigh*
2007-03-02 02:23:00 +00:00
Mikael Magnusson
d9f14c1d01 update copyright step 2 2006-08-22 16:44:18 +00:00
Mikael Magnusson
2fd2473de5 some systems seem to not include locale.h even with ENABLE_NLS set 2006-08-19 13:49:53 +00:00
Mikael Magnusson
005eb35ee8 fix some warnings from -Wall 2006-08-19 05:05:36 +00:00
Mikael Magnusson
c495ecfeff why did i save that return value? 2006-08-19 04:19:57 +00:00
Mikael Magnusson
9fb488c7bf maybe it was just a syntax error? 2006-08-19 04:17:55 +00:00
Mikael Magnusson
ba6daeae8e don't be so afraid to include locale.h 2006-08-19 04:15:51 +00:00
Mikael Magnusson
dd48997668 fix two memleaks 2006-06-11 10:21:35 +00:00
Mikael Magnusson
c5a14b4f04 !"$!#"% 2006-01-15 11:40:34 +00:00
Mikael Magnusson
b177ace2c3 yes it is 2006-01-15 11:40:21 +00:00
Mikael Magnusson
425dc31808 fix pixelsize when using pango (set_size != set_absolute_size) 2006-01-15 11:39:55 +00:00
Mikael Magnusson
efcb68de1d and tidy it up a bit 2005-09-01 15:34:03 +00:00
Mikael Magnusson
e298cde9b0 remove some excessive swearing from a comment about pango 2005-09-01 15:33:04 +00:00
Mikael Magnusson
3b83230aaf ifdef helps 2005-07-26 08:02:13 +00:00
Mikael Magnusson
eecc457292 --disable-nls disables locale.h which is needed for pango, sort of 2005-07-20 19:51:57 +00:00
Mikael Magnusson
3d1048f5a7 forgot debug print 2005-07-16 20:30:17 +00:00
Mikael Magnusson
b2cd881d31 80 columns 2005-07-16 20:27:06 +00:00
Mikael Magnusson
b1a1ad5d06 fix the PangoLanguage thing to get from locale 2005-07-16 20:16:55 +00:00
Mikael Magnusson
2fb7b70ccb maybe even better layouting (ie the previous was off by a few marks). memo to self, what do to about PangoLanguage? 2005-07-16 16:11:58 +00:00
Mikael Magnusson
e37b07bfa0 dont need pll 2005-07-16 14:45:41 +00:00
Mikael Magnusson
a08bb4abba minor movement of code 2005-07-16 01:01:04 +00:00
Mikael Magnusson
a5100fe677 make the pango rendering code really complicated because that is the only way to make it draw correctly 2005-07-16 00:56:45 +00:00
Mikael Magnusson
8f9aae0cc2 fix the dpi stuff with pango by reading the right ascent and descent stuff 2005-07-15 14:39:31 +00:00
Mikael Magnusson
0417d1226c RrFontHeight is meaningless with pango, it will be different for every string drawn, so ask pango for the height after we tell it the text to draw. Should make text be centered vertically better when mixing fonts. Still moves a pixel down for some strings for me, but it was several before. If anyone knows more about this please mail or bugzilla etc. Also fix an indenting error. 2005-06-26 01:39:53 +00:00
Mikael Magnusson
3b51624005 well, i pinpointed the problem code that causes the fonts to be cut off, but this workaround is extremely temporary and possibly only works for me by accident? 2005-04-04 07:02:22 +00:00
Mikael Magnusson
7fc31cd045 fix a warning 2005-03-31 08:31:31 +00:00
Mikael Magnusson
2290916e2e Update the pango code 2005-03-11 21:49:07 +00:00
Mikael Magnusson
7089a86006 remove a spurious identical ifdef diff decided to generate 2005-02-13 17:27:51 +00:00
Mikael Magnusson
9be3a21380 apparently nobody uses cvs or bothers to tell me about compile errors 2004-12-03 23:53:17 +00:00
Mikael Magnusson
e7d1ba6ae3 Pango! yay. Patch mostly by Mohammed Sameer, fixed some memleaks and ifdeffed by me. May still have some bugs. 2004-11-07 13:20:54 +00:00
Mikael Magnusson
4b32a060ad no more april's fool (and also committed a bit too much before) 2004-04-01 21:50:11 +00:00
Mikael Magnusson
1c9a69e1df these two changes make the text a lot more readable 2004-03-31 18:32:44 +00:00
Dana Jansens
740c5b2a20 consistant glib type usage 2003-10-15 03:59:35 +00:00
Dana Jansens
16f46c296d no tabs 2003-09-17 07:44:49 +00:00
Dana Jansens
c4e4760c41 add copyright headers, adjust --version output to include copyright, and --help output to not include version output. 2003-09-17 07:32:52 +00:00
Dana Jansens
54d04314e7 remove debug print 2003-09-14 07:33:16 +00:00
Dana Jansens
3dc4750ea4 destroy 'pat' always 2003-09-14 06:42:04 +00:00
Dana Jansens
4685a11530 wasted variable 2003-09-12 05:56:02 +00:00
Dana Jansens
700e551390 fix a bunch of memleaks from valgrind and stuff 2003-08-28 19:10:36 +00:00
Dana Jansens
c34ef4028e half way through the changes to new menu code/design. hot shit. static menus work, on to plugins next. 2003-08-28 02:10:23 +00:00
Dana Jansens
36056a69d7 missing a header 2003-07-31 16:30:53 +00:00
Dana Jansens
58be655de3 remove rependancy on geom.h from the kernel, provide what is used in its own geom.h 2003-07-10 04:31:34 +00:00
Dana Jansens
7f44ed5362 include stdlib for exit() 2003-07-07 20:26:32 +00:00