Re: [gtk-list] Re: widgets without user input



Ionutz writes:

>Even so, this is not the perfect solution: what I would really like
>would be a range with a colored background: 
>- green for allowed range
>- red for out-of-range

check out Eric Tiedemann's gtklevelhold and its underlyind gtkrgb. Its
*perfect* for what you're describing. Eric wrote it with audio level
metering in mind, but it would work fine for a temperature gauge too.
the colors are exactly what you want to (even better, since they fade
from green through red).

i don't have the url: write est@hyperreal.org to get a copy. he
announced it recently on the list.

--p

ps. don't take the performance of his lhdemo as indicative: the way
its written, it will burn close to 100% of your CPU cycles, since it
calls a timeout function every 10ms and does real work on almost every
one. 10ms on most i386 systems is less than the timer
interval. Tweaking the "steps" and "hold" arguments gets it back to a
well-behaved widget very easily.



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