Re: GtkCList - setting row colours & scrolling
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list redhat com
- Subject: Re: GtkCList - setting row colours & scrolling
- Date: 07 Dec 1998 12:59:00 -0500
"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]