简体   繁体   English

Glade中的按钮为什么会方形?

[英]Buttons in Glade, why are they square?

I'm new at GTK. 我是GTK的新手。 I'm using Glade to make an interface and just want to insert objects (like buttons and others) into a container. 我正在使用Glade创建界面,只想将对象(例如按钮和其他)插入容器中。 I've choosen GtkFixed so that all elements can be freely located and sized. 我选择了GtkFixed以便可以自由定位所有元素并确定其大小。 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 这是一张图片 屏幕截图

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. 谢谢。

You have to remove the tick from Height request and Width request (I don't know the equivalent names in your language). 您必须从“ Height request和“ Width request删除对勾(我不知道您所用语言的对等名称)。

Besides, you should be aware that GtkFixed is difficult to use when the window can be resized. 此外,您应该知道,当可以调整窗口大小时,GtkFixed很难使用。 GtkBox is often easier. GtkBox通常更容易。

常用标签的屏幕截图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM