Re: How are gtk scrollbars drawn?




On Sun, 6 Jun 1999, FITZSIMMONS THOMAS wrote:
> 
> 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
> follows:
>
... 
> 
> Where does "proportioning" take place?
> 

The slider is a separate GdkWindow; the GdkWindow is sized to change the
size of the slider. That's why you still see a slider when you set the
function to NULL, because the slider window has a different background
than the trough window.

You might want to look at gtk_vscrollbar_calc_slider_size() in 
gtkvscrollbar.c.

The only solution I can think of is to paint the slider the same color as
the trough so it's invisible, then draw a smaller slider. But button
clicks on the invisible part of the slider will still take effect - so,
that's not really a solution at all.

Might have to wait for more advanced themeability. :-)

Havoc



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