Fixed#

class ignis.widgets.fixed.Fixed(*args: Any, **kwargs: Any)#

Bases: Gtk.Fixed

A fixed container widget that allows positioning child widgets at specific coordinates. Unlike other containers with an automatic layout, Fixed use absolute coordinates.

Parameters:

**kwargs -- Properties to set.

from ignis import widgets

widgets.Fixed(
    child=[
        widgets.FixedChild(
            widget=widgets.Label(label="Top Left"),
            x=10,
            y=10
        ),
        widgets.FixedChild(
            widget=widgets.Button(label="Center"),
            x=100,
            y=50
        ),
        widgets.FixedChild(
            widget=widgets.Icon(image="settings"),
            x=200,
            y=200
        )
    ],
)
gproperty child: list[FixedChild]#
  • read-write

The list of child widgets with their positions.

class ignis.widgets.fixed.FixedChild(widget: gi.repository.Gtk.Widget, x: int, y: int) None#

A data class representing a child widget positioned in a Fixed container.

widget: Widget#

The GTK widget to be positioned.

x: int#

The horizontal position (x-coordinate) in pixels.

y: int#

The vertical position (y-coordinate) in pixels.