Re: GtkCList - setting row colours & scrolling




"Damon Chaplin" <DAChaplin@email.msn.com> writes:

> Hi,
> 
> gtk_clist_set_foreground/background()
> =======================================
> 
> These set the colours for one row in the clist.
> Currently they call gdk_color_alloc() to allocate the colour.
> 
> I'm not sure this is a good idea.
> For the font selection widget, I use the functions quite a
> lot in the font style clist to set different colours for rows
> representing charsets. So each time a different font is selected
> there may be a few calls to gdk_color_alloc(). Yet I am using
> the same colours all the time, and they don't need to be
> allocated.
 
gdk_color_alloc() looks up already allocated colors in a hash table
and reference counts the colors (it also completely avoids calling
the server completely for TrueColor modes). So this shouldn't be a
problem.
 
> Scrolling
> =========
> 
> Currently the clist only scrolls half a page when you click on
> the trough. In adjust_adjustments I think it should use
> window_height - row_height instead of window_height / 2.
> (Unless window_height - row_height is negative.)
> Scrolling through the list would be much quicker.

Perhaps one should have 2 or three rows of overlap.

                                        Owen



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