Re: Reducing space between treeview rows



On Thu, 2006-04-27 at 11:13 -0400, Morten Welinder wrote:
> > Some time ago I posted to various gtk related lists about reducing
> > padding between treeview rows.
> 
> The official word is that it cannot be done:
> 
> || You probably want to set horizontal-padding and vertical-padding (both
> || GtkTreeView style properties) to zero (they are not zero by default). We can't
> || shave more space than that off.
> 
> Now, if that is not good enough for you, what you need to realize is
> that GtkCellRendererText reserves space not only for what is in the
> cell, but also what you might one day put in there.  Think "accented
> Chinese characters with a few underlines".
> 
> What you can do is to go into gtkcellrenderertext.c's get_size and
> change
> 
>   pango_layout_get_pixel_extents (layout, NULL, &rect);
> 
> to
> 
>   pango_layout_get_pixel_extents (layout, &rect, NULL);

So this means that a custom cell render can achieve the desired effect.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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