0

I'm new at GTK. I'm using Glade to make an interface and just want to insert objects (like buttons and others) into a container. I've choosen GtkFixed so that all elements can be freely located and sized. The problem is that when i drag a button for example, the button apparently gets it size from the parent (in this case the container) and takes a square shape. Here's an image Screen capture

I want the button to take the standard size, just like a rectangule or something. What i'm i doing wrong? I've checked some options in the container but can't figure out the way. Thanks.

Hernan
  • 1,149
  • 1
  • 11
  • 29
  • possible duplicate of [hexagon buttons in GTK+](http://stackoverflow.com/questions/23957525/hexagon-buttons-in-gtk) – Leb Sep 18 '15 at 19:18
  • I'm just dragging and dropping a button in the container and asking why is squared, when it's suppouse to be a rectangule like any other button. – Hernan Sep 18 '15 at 19:28
  • Select the button, scroll to the bottom of the "Comunes" tab, and you should see something like "Width request" and "Height request" (I don't know if those will be translated) where you can change the size of the button. When you are using GtkFixed or GtkLayout, you are on your own with sizing and positioning everything. Most GTK+ programs don't use either, instead using GtkBox and GtkGrid and letting GTK+ determine what the best sizes should be. That being said, good luck. – andlabs Sep 18 '15 at 19:38
  • Ok, i'm using GtkBox and seems pretty much easy to use. Should i erase this answer? Thanks. – Hernan Sep 18 '15 at 20:11
  • No need to erase anything :) What theme are you using, by the way? – andlabs Sep 18 '15 at 22:22

1 Answers1

0

You have to remove the tick from Height request and Width request (I don't know the equivalent names in your language).

Besides, you should be aware that GtkFixed is difficult to use when the window can be resized. GtkBox is often easier.

Screenshot of Common tab

elya5
  • 2,236
  • 1
  • 11
  • 27