What I do to get around this, is in my custom-cell-renderer (which may be hacky but it works for me) is to decrease from 'height' in its
custom-cell-renderers 'get_size' function so when its finally rendered its closer to 'my_desired_height' as we use the space for rendering too (see below).
<snip>
if (height)
{
gint vertical_separator;
*height = my_desired_height;
/* Each row has a vertical-separator equal to 2, decrease by this amount as we render to the blank area. */
gtk_widget_style_get (widget, "vertical-separator", &vertical_separator, NULL);
*height -= vertical_separator * 2;
}
</snip>
and then in the custom-cell-renderers 'render' function I then add the height back again.
/* Each row has a vertical-separator equal to 2, increase by this amount to render over this blank area. */
gtk_widget_style_get (widget, "vertical-separator", &vertical_separator, NULL);
height += vertical_separator * 2;
This way though the space is still there, you are actually rendering over it,
giving the impression that its not there. Hope you get what I mean.
From: Doug McLain <doug nostar net>
Date: 2006/03/28 Tue AM 09:32:53 GMT
To: cole-anstey ntlworld com
Subject: Re: Reducing space between treeview rows
Yes, I set it to 0, along with ythickness, used tiny fonts, set the y_pd
property of the CellRenderer to 0, tried every theme I have and even
bogus rc file (no theme). Nothing will bring the the rows any closer
together. At the very closest 2 rows will come together in say the file
manager, there is still enough room for almost another row of text. I
want the ability to make one row of text to touch the next. Not that I
would, but I want to get really close to that. It's looking like a gtk
bug to me.
cole-anstey ntlworld com wrote:
Have you checked out the vertical_separator style property of the GtkTreeView. Its this that is adding the extra spacing.
-----Original Message-----
From: Doug McLain [mailto:doug nostar net]
Sent: 26 March 2006 08:56 am
To: Gus Koppel
Cc: gtk-app-devel-list gnome org
Subject: Re: Reducing space between treeview rows
***********************
Your mail has been scanned by InterScan VirusWall.
***********-***********
I've tried different themes as well as setting xthickness and ythickness manually in both my theme's rc file and the applications rc file.
Gus Koppel wrote:
Doug McLain wrote:
I am trying to reduce the spacing between rows of text in a single
column treeview. Ive been experimenting with both the ypad and height
properties. They both work in adding space, but neither will take any
space out. Seems like anything less than about ypad=3 doesn't do
anything. With a font size of 8, there is almost enough space between
rows to fit another row in between them. Even trying a tiny font size
for troubleshooting purposes, doesnt bring the rows any closer together.
Can someone help, please?
If it's not because late GTK+ versions have changed their behaviour here
then likely your current GTK+ theme is interfering with your pad
setting. Try some other themes. Basically, ypad = 0 should make a
difference. I use it, too. Unfortunately, as also the vartype shows,
negative ypad values are not supported.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
-----------------------------------------
Email sent from www.ntlworld.com
Virus-checked using McAfee(R) Software
Visit www.ntlworld.com/security for more information
-----------------------------------------
Email sent from www.ntlworld.com
Virus-checked using McAfee(R) Software
Visit www.ntlworld.com/security for more information