Package: gtk

Class gtk:aspect-frame

Superclasses

Documented Subclasses

None

Direct Slots

child
The child property of type gtk:widget (Read / Write)
The child widget.
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
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
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 preserves the aspect ratio of its child. The frame can respect the aspect ratio of the child widget, or use its own aspect ratio.

CSS nodes

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

Accessibility

Until GTK 4.10, the gtk:aspect-frame implementation used the :group role. Starting from GTK 4.12, the gtk:aspect-frame implementation uses the :generic role.
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

2023-8-23