Package: gtk

Class gtk-aspect-frame

Superclasses

gtk-frame, gtk-bin, gtk-container, gtk-widget, gtk-buildable, g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

ratio
The ratio property of type :float (Read / Write)
Aspect ratio if the obey-child property is false.
Allowed values: [0.0001, 10000.0]
Default value: 1.0
obey-child
The obey-child property of type :boolean (Read / Write)
Force aspect ratio to match that of the child widget of the aspect frame.
Default value: true
xalign
The xalign property of type :float (Read / Write)
The x alignment of the child.
Allowed values: [0.0, 1.0]
Default value: 0.5
yalign
The yalign property of type :float (Read / Write)
The y alignment of the child.
Allowed values: [0.0, 1.0]
Default value: 0.5

Details

The gtk-aspect-frame widget is useful when you want pack a widget so that it can resize but always retains the same aspect ratio. For instance, one might be drawing a small preview of a larger image. The gtk-aspect-frame class derives from the gtk-frame class, so it can draw a label and a frame around the child. The frame will be "shrink-wrapped" to the size of the child.

CSS nodes

The gtk-aspect-frame implementation uses a CSS node with name frame.
 

Slot Access Functions

Inherited Slot Access Functions

See also

2021-12-17