Scale#

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

Bases: Gtk.Scale

A slider widget.

Overrided properties:
  • value_pos: Position where the current value is displayed. Works only if draw_value is set to True. Default: top.

Value position:
  • left

  • right

  • top

  • bottom

Widget.Scale(
    vertical=False,
    min=0,
    max=100,
    step=1,
    value=20,
    on_change=lambda x: print(x.value),
    draw_value=True,
    value_pos='top'
)
property value: float#
  • optional, read-write

The current value.

property min: float#
  • optional, read-write

Minimum value.

property max: float#
  • optional, read-write

Maximum value.

property on_change: Callable#
  • optional, read-write

The function to call when the value changes.

property step: float#
  • optional, read-write

Step increment.

property vertical: bool#
  • optional, read-write

Whether the scale is vertical.