Re: troughs?



On Sun, 17 Oct 1999, Ben FrantzDale wrote:

> I'm working on a gtk theme to go with my minEguE Enlightenment theme. What
> I'm trying to figure out is how to set scrollbars, progressbars, and sliders
> to each have a different trough. All of the pixmap themes I've looked at all
> have the same image for the background of each, so looking into other
> themes' gtkrc files hasn't been of help.

You would have to make a binary theme, i.e. write a theme engine in C 
that makes a few patches (in realtime) into some GTK class structs.
The class hierarchy for the sliders and scrollbars are:

  GtkRange            <- base class for GtkScrollbar and GtkScale
  +-- GtkScrollbar    <- the scrollbar class, i.e. "balance sliders"
  +-- GtkScale        <- the slider class, i.e. "volume sliders"

In order for the troughs to be drawn differently, you would have to patch
the "draw_trough" method in the class structs for GtkScrollbar and/or
GtkScale for them to be different functions.
None of the classes override the draw_trough-function passed on to them
from the GtkRange class by default.

I suggest that you base your theme on the Pixmap theme.

 / Johan
         --  johan@tiq.com  --  http://www.dsv.su.se/~j-hanson/ --



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