Re: gnome-panel transparency problems

On Thu, Apr 22, 2004 at 11:05:15AM +0300, Enver ALTIN wrote:
> Hi,
> On Thu, 2004-04-22 at 00:36 -0600, Kurt Fitzner wrote:
> > Definitely will log it. :)  As to fixing it... if no one else is 
> > actively working on it at the moment, I'll definitely take a shot at it. 
> First of all, I would like to thank you for pointing on the problem and
> your work of transparent applets is appreciated.
> > All right. I'll do it for those applets for which it will make sense 
> > right now, and do some more thinking for some of the others that could 
> > be harmed.  Maybe XORing text on the background??

Hey, I have a proposal! (have thought about this for a LOOONG time):

For areas in applets that contain text (clock applet, window list applet, etc),
check the RGB value of the pixels in the background area;

(example for 8-bit color depth)
if the average RGB value < 128
   draw text in white
   draw text in black

There are two possible approaches:
1) check per-applet
2) check per-character

Approach 1 is of course faster, but does not handle backgrounds with a lot of
shifting nuances very well.
Approach 2 is safe in this manner, but requires a lot more calculation. 

Some sampling approach could work as well (eg check every 2nd/4th/Nth pixel).

Of course, there should be an option in the panel properties: ("Font color:
[x]automatic [x]manual <choose..>") If "automatic" mode is chosen, there could
be an secondary option for what method to use - "[x]fail-safe [x]fast"

Note: I think it would look best if the applet bevels etc also used the same
foreground color.

This could turn out *nice* (did some mockups some time ago, think I have them


This mail sent through IMP:

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