The user can control which state should be active by clicking the
empty area, or by dragging the handle.
gtk.switch_.Switch can also handle situations where the underlying state
changes with a delay. In this case, the slider position indicates
the user's recent change (as indicated by the gtk.switch_.Switch.gboolean
property), and the color indicates whether the underlying state (represented
by the gtk.switch_.Switch.gboolean property) has been updated yet.
See signal@Gtk.Switch::state-set for details.
CSS nodes
switch
├── image
├── image
╰── slider
gtk.switch_.Switch has four css nodes, the main node with the name switch and
subnodes for the slider and the on and off images. Neither of them is
using any style classes.
gtk.switch_.Switch is a "light switch" that has two states: on or off.
The user can control which state should be active by clicking the empty area, or by dragging the handle.
gtk.switch_.Switch can also handle situations where the underlying state changes with a delay. In this case, the slider position indicates the user's recent change (as indicated by the gtk.switch_.Switch.gboolean property), and the color indicates whether the underlying state (represented by the gtk.switch_.Switch.gboolean property) has been updated yet.
See signal@Gtk.Switch::state-set for details.
CSS nodes
gtk.switch_.Switch has four css nodes, the main node with the name switch and subnodes for the slider and the on and off images. Neither of them is using any style classes.
Accessibility
gtk.switch_.Switch uses the gtk.types.AccessibleRole.Switch role.