Re: new header style looking strange with some themes



Am 20.01.04 00:42 schrieb(en) Peter Bloomfield:
> There's probably a better way to adapt to theme changes (even adapting  
> on the fly, like every other widget!)--if anyone knows the necessary  
> magic, please let us know!

Well, Peter, here is the magic ;-))

trick #1: track theme changes using a style-set signal on any widget. This  
one will always be called upon balsa's startup when any theme is selected;
trick #2: get the rc style for the text view by path;
trick #3: use a *new* style for the viewport to avoid the bg color from  
being overwritten by a pixmap from the rc style (the case of a  
gtk_style_copy()...).

The code works with *all* themes I have installed on my box, inter alia  
Ocean dream and AquaX. Note that some themes seem not to return an rc  
style for the text view, in which case I fall back to white. Oh, and  
without any theme (gtk-only installation), every bg will be white anyway,  
right?

Maybe you can use the same trick to beautify the colors of the header box  
upon theme changes? I attach my test app which I used to learn about all  
this stuff, too...

Hth,
Cheers,

	Albrecht :-))

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Albrecht Dreß  -  Johanna-Kirchner-Straße 13  -  D-53123 Bonn (Germany)
       Phone (+49) 228 6199571  -  mailto:albrecht.dress@arcor.de
_________________________________________________________________________

balsa-bg.patch.gz

gtktst.c.gz

PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]