Re: [gtk-list] Button too small for text



Nils Rennebarth wrote:
> 
> I made a small application with two buttons labeled "Quit" and "Grab"
> 
> The natural size of these is too small. They show up as (approximately)
> 
> +----+ +----+
> |Quit| |Grab|
> +----+ +----+
> 
> whereas what I would like better is:
> 
> +------+ +------+
> | Quit | | Grab |
> +------+ +------+
> 
> How can I achieve this? I could of course label them " Quit " and " Grab "
> but I consider this kludgy. Is there a "right" solution?
> 
> The labels should not resize when the toplevel window is resized (in fact
> resizing the toplevel window is now switched off thanks to the helpful hints
> on this list).

You can use the padding properties of the labels:

  button = gtk_button_new_with_label (_("Quit"));
  gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 16, 0);

Damon




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