Re: Remove padding in a GtkButton
- From: Jérôme Couderc <j couderc ifrance com>
- To: "David Necas (Yeti)" <yeti physics muni cz>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Remove padding in a GtkButton
- Date: Thu, 14 Oct 2004 23:12:10 +0200
Hi David,
Thanks for theses informations...
Using the switch : GTK_WIDGET_UNSET_FLAGS(Button,GTK_CAN_FOCUS) seems to
free enought space, but of course now it can't get focus...
With the switch GTK_WIDGET_UNSET_FLAGS(Button,GTK_CAN_DEFAULT), I
haven't seen some changes...
So I think that setting GtkButton::focus_padding (or "focus_width",
"focus-line-width") to zero will do exactly what I want, but I don't
know how to code it. Have you an example which will help me?
Theses values are only in read mode, with gtk_widget_style_get
(GTK_WIDGET (Button),"focus_padding", &value,NULL) ?
Regards,
Jerome
David Necas (Yeti) wrote:
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]