Switch#

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

Bases: Gtk.Switch

A switch widget.

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

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