[pygtk] Button x- and ythicknesses

Osmo Salomaa otsaloma at cc.hut.fi
Mon Nov 6 08:11:37 WST 2006


When putting close buttons on notebook tabs, I'd like the button to be
as small as possible while still containing a menu-size icon. I looked
at the C code of Gedit and Epiphany. In both, they create a new rc style
and set the x- and ythicknesses to zero.
	
rcstyle = gtk_rc_style_new ();
rcstyle->xthickness = rcstyle->ythickness = 0;
gtk_widget_modify_style (close_button, rcstyle);
gtk_rc_style_unref (rcstyle),

I tried the obvious Python version, but it had no effect.

rc_style = gtk.RcStyle()
rc_style.xthickness = 0
rc_style.ythickness = 0
button.modify_style(rc_style)

Can I do this with PyGTK? Or is there perhaps another way to change the
x- and ythicknesses of individual buttons?

-- 
Osmo Salomaa



More information about the pygtk mailing list