openbox/obrender
Carlos Pita 177a0340a7 Separate theme options for osd prompt buttons.
I managed to keep backwards compatibility without really cluttering
the code so here is the patch
http://bugzilla.icculus.org/show_bug.cgi?id=4874 too.

Please keep in mind that this is my first piece of code for openbox
and that I'm not a die hard openbox user (yet), not to tell the patch
was not exhaustively tested. Anyway I think it's pretty much in a good
shape but any criticism will be welcome.

Basically the patch add the following theme options for controlling
buttons in osd prompts:

%%%% colors
%
% for the text inside the button
osd.button.unpressed.text.color
osd.button.pressed.text.color
osd.button.focused.text.color
%
% for the line art around the button
%  (if you don't wan't the box just make box.color = bg.color)
osd.button.pressed.box.color
osd.button.focused.box.color

%%%% textures
%
osd.button.unpressed.bg
osd.button.pressed.bg
osd.button.focused.bg

The buttons can be in three states:

 unpressed: neither clicked nor selected
 focused: selected but not clicked
 pressed: clicked (and of course selected)

I discarded the previous distinction between press and pfocus as in
fact it was only a formal distinction, in that both appearances
mimicked each other in every sense. It think that it was just
inherited from the way titlebar buttons are managed so I decided to
simplify it a bit.

All the options default in a way that preserves backwards compatibility:

osd.button.unpressed.text.color  -> osd.active.label.text.color
osd.button.pressed.text.color -> osd.active.label.text.color
osd.button.focused.text.color -> osd.active.label.text.color

osd.button.pressed.box.color ->  window.active.button.pressed.image.color
osd.button.focused.box.color -> window.active.button.hover.image.color

osd.button.unpressed.bg -> window.active.button.unpressed.bg
osd.button.pressed.bg -> window.active.button.pressed.bg
osd.button.focused.bg -> window.active.button.hover.bg

Notice that a good deal of locs where added to theme.c but in
compensation prompt.c is pretty much simpler now because the
appearances and textures are created while loading the theme.
2011-08-02 22:18:31 +02:00
..
button.c fix 80 cols and clean up the button color loading function 2010-10-14 15:54:48 +02:00
button.h Buttons seem to work! 2010-10-14 15:54:47 +02:00
color.c READ_COLOR macros done, RrColorCopy added, indentation fixed. 2010-10-14 15:43:57 +02:00
color.h Set up work for making a 3.5 prerelease. 2009-12-21 14:08:34 -05:00
font.c new enum values need to be handled in switches 2010-05-17 19:31:21 -04:00
font.h Set up work for making a 3.5 prerelease. 2009-12-21 14:08:34 -05:00
geom.h Set up work for making a 3.5 prerelease. 2009-12-21 14:08:34 -05:00
gradient.c Set up work for making a 3.5 prerelease. 2009-12-21 14:08:34 -05:00
gradient.h Set up work for making a 3.5 prerelease. 2009-12-21 14:08:34 -05:00
icon.h Set up work for making a 3.5 prerelease. 2009-12-21 14:08:34 -05:00
image.c Big rework of image.c and the image cache system. 2011-01-24 14:19:22 -05:00
image.h Big rework of image.c and the image cache system. 2011-01-24 14:19:22 -05:00
imagecache.c Big rework of image.c and the image cache system. 2011-01-24 14:19:22 -05:00
imagecache.h Big rework of image.c and the image cache system. 2011-01-24 14:19:22 -05:00
instance.c use g_slice_new() instead of g_new() part 4 2010-02-12 14:13:32 -05:00
instance.h Set up work for making a 3.5 prerelease. 2009-12-21 14:08:34 -05:00
Makefile Set up work for making a 3.5 prerelease. 2009-12-21 14:08:34 -05:00
mask.c use g_slice_new() instead of g_new() part 4 2010-02-12 14:13:32 -05:00
mask.h Set up work for making a 3.5 prerelease. 2009-12-21 14:08:34 -05:00
obrender-3.5.pc.in include imlib2 as a dep of obrender in the pkg-config file if it's using it 2010-02-12 15:13:39 -05:00
render.c cleaning up remnants of bad rebase merges and modernizing some sections 2010-10-14 15:54:48 +02:00
render.h Merge branch 'm4/master' 2011-08-02 22:18:14 +02:00
test.c Set up work for making a 3.5 prerelease. 2009-12-21 14:08:34 -05:00
theme.c Separate theme options for osd prompt buttons. 2011-08-02 22:18:31 +02:00
theme.h Separate theme options for osd prompt buttons. 2011-08-02 22:18:31 +02:00
version.h.in Set up work for making a 3.5 prerelease. 2009-12-21 14:08:34 -05:00