diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py index d22b412c..24b5ca53 100644 --- a/src/sugar/graphics/icon.py +++ b/src/sugar/graphics/icon.py @@ -580,8 +580,8 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem): palette = property(get_palette, set_palette) -def get_icon_state(base_name, perc): - step = 5 +def get_icon_state(base_name, perc, step=5): + assert step > 0, 'get_icon_state(): step must be positive\n' strength = round(perc / step) * step icon_theme = gtk.icon_theme_get_default()