Switch#

class ignis.widgets.Widget.Switch(*args: Any, **kwargs: Any)#

Bases: Gtk.Switch

A switch widget.

Parameters:

**kwargs -- Properties to set.

Widget.Switch(
    active=True,
    on_change=lambda x, active: print(active),
)
gproperty on_change: Callable | None#
  • read-write

The function to call when the position of the switch changes (e.g., when the user toggles the switch).