GtkLabel alignment and padding

2019-08-02 20:44发布

问题:

I have GtkLabel in Glade with X align set to 0, X pad set to 5, Expand set to No.

Label is located under horizontal box together with spin button and another label.

The problem is that X pad is applied to both, left and right side.

I want it to be applied only to right side.

What am I doing wrong?

回答1:

Xpad is applied to both left and right.

Glade 3.10

If you just want to have a margin on the right, then change Margin on the right available in the Common tab:

Glade 3.8

Right click on the GtkLabel widget and select Add Parent->Alignment. Click in the GtkAlignment widget and set RightPadding to the desired value.