lists.zerezo.com
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
***BOGO*** Re: How to find the exact size a button is going to get?
- Date: Tue, 03 Jun 2008 09:36:40 +0200
- From: Toralf Lund <toralf@xxxxxxxxxxxxxx>
- Subject: ***BOGO*** Re: How to find the exact size a button is going to get?
varun shrivastava wrote:
> you can access GtkAllocation structure which stores the x, y, width
> and height allocated to a widget
That will (only) give me the size of an existing widget, won't it?
Not what I'm looking for; as I was saying, I want to know what size a
widget will have without actually creating it. Or differently put, I'd
like to know the "rules" for margins/borders that are drawn around a
widget I add to a button.
- Toralf
>
> widget->allocation.x
> widget->allocation.y
> widget->allocation.width
> widget->allocation.height
>
> bye
> varun
>
>
>
> On Mon, Jun 2, 2008 at 5:13 PM, Toralf Lund <toralf@xxxxxxxxxxxxxx
> <mailto:toralf@xxxxxxxxxxxxxx>> wrote:
>
> For various technical reasons I won't go into right now, one of my Gtk
> apps need to know what size certain buttons it is going to create will
> get, before it actually creates them. Is there any way at all I can
> calculate this? The buttons will contain pixmaps, and I have the image
> data for those, so I actually know the size of the "contents" of the
> buttons, but the total size of a button is somewhat larger as
> (apparently) borders are always added, so how do I find the size of
> these? The border associated with the "border-width" property is not
> the one I want, I think, but rather extra borders that magically
> appear
> based on the the style or theme or I don't know what.
>
> Help, anyone?
>
> - Toralf
>
>
> _______________________________________________
> gtk-list mailing list
> gtk-list@xxxxxxxxx <mailto:gtk-list@xxxxxxxxx>
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
>
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list