sugar3.graphics.progressicon module

A progress icon is a progress indicator in the form of an icon.

class sugar3.graphics.progressicon.ProgressIcon(icon_name, pixel_size, stroke_color, fill_color, direction='vertical')

Bases: gi.repository.Gtk.DrawingArea

Display the progress filling the icon. This class is compatible with the sugar3.graphics.icon.Icon class. Call update(progress) with the new progress to update the icon. The direction defaults to ‘vertical’, in which case the icon is filled from bottom to top. If direction is set to ‘horizontal’, it will be filled from right to left or from left to right, depending on the system’s language RTL setting. :param pixel_size: sets the icon size

[e.g. pixel_size=style.LARGE_ICON_SIZE]

Parameters
  • icon_name (string) – Name of icon [e.g. icon_name=’test_icon’]

  • stroke_color (string) – Stroke color means border color.

  • fill_color (string) – The main (inside) color of progressicon [e.g. fill_color=style.COLOR_BLUE.get_svg()

do_get_preferred_height()

Calculate the minimum and natural height of the progressicon.

do_get_preferred_width()

Calculate the minimum and natural width of the progressicon.

update(progress)

Updates progressicon with progress’s value. Example: update(0.9)