Re: Remove padding in a GtkButton



On Thu, Oct 14, 2004 at 12:38:43AM +0200, Jérôme Couderc wrote:
    I've a little image (5x5 pixels) to display in a small button
(13x13 pixels)

I'm afraid once you start counting outer pixel dimensions of
a button you are creating something that is going to break
whenever Gtk+ theme changes.

but it seems that there is padding (~3 pixels) in the
button that prevent to display the image correctly.
So there is only 3 pixels in the button to display an image of 5 pixels...

So, how can I remove this padding? (note that there is no problem on the
gtk-1.2 version)

But if you want a button w/o any inner border... First, it
should not default, nor focus, because you don't want the
border.  So set its "can-default" and "can-focus" properties
to FALSE.  Then set style properties GtkButton::focus_line_width
and GtkButton::focus_padding to zero.  This can be done e.g.
by assigning the button a widget name and using gtk_rc_parse_string()
... and it was discussed here in details more than one time.

Yeti


--
Dynamic IP address is not a crime.



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