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

Parameters:

**kwargs -- Properties to set.

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'
)
gproperty value: float#
  • read-write

The current value.

gproperty min: float#
  • read-write

Minimum value.

gproperty max: float#
  • read-write

Maximum value.

gproperty on_change: Callable#
  • read-write

The function to call when the value changes.

gproperty step: float#
  • read-write

Step increment.

gproperty vertical: bool#
  • read-write

Whether the scale is vertical.