Merci! > Subject: Re: Small "close_tab_button" > From: pierre-luc pierlux com > To: julien_bramary msn com > CC: gtk-list gnome org > Date: Sat, 12 Dec 2009 05:18:32 -0500 > > On Sat, 2009-12-12 at 11:04 +0100, Julien Bramary wrote: > > Hello all, > > > > After 2 years of working with GTK+ I have hit a brick wall. The fact > > that it took 2 years for this to happen shows how good the > > documentation and the kit in general are! > Yes it is good :) > > > > Anyway here's my problem: > > This works nicely, *but*, the button is huge (see > > not_nice_big_button.png attached). There seems to be a lot of white > > space between the edge of the icon and the edges of the button itself. > > You should try looking at other FOSS applications code :) For instance, > GEdit has the same buttons. > > You have to set a GtkStyle for that button to remove the focus padding. > Specificly: > > gtk_rc_parse_string (""" > style "notebook-close-button-style" > { > GtkWidget::focus-padding = 0 > GtkWidget::focus-line-width = 0 > xthickness = 0 > ythickness = 0 > } > widget "*.notebook-close-button" style > "notebook-close-button-style" > """); > > And then name the button widgets "notebook-close-button" and voilà! > > gtk_widget_set_name (widget, "notebook-close-button"); > > Pierre-Luc Keep your friends updated— even when you’re not signed in. |