How are gtk scrollbars drawn?


I have been trying to figure out what functions are called to draw the
elements of a scrollbar.  I want to create scrollbars whose sliders do not
change size (a la MacOS).  I have been experimenting with the Metal theme
engine by replacing default function pointers with the empty function, as

In theme_init:

GtkRangeClass *rangeclass;

rangeclass->draw_slider = NULL;

The result of this code is a scrollbar with a blank (background
coloured) region the size of a normal proportional slider, that can be
scrolled just like a normal slider. I have tried similar code on other
drawing functions in the range and widget classes, and I have looked
through gtkrange.c in LXR, but I haven't found the code that creates the
propotional "blank" slider.

I have a feeling it is in the parent widget of the range, but I've looked
through the scrollbar code and I can't find it there either.

Where does "proportioning" take place?

Any help would be greatly appreciated.


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