Add Icon.get_badge_size

Add get_badge_size method to Icon class, so it can be accessed
by other Icon sub-classes.

ie., jarabe.frame.notification.NotificationPulsingIcon.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
This commit is contained in:
Martin Abente Lahaye 2014-04-25 13:45:41 -04:00 committed by Gonzalo Odiard
parent e47feb3b0f
commit 72994bd73c

View File

@ -514,6 +514,9 @@ class Icon(Gtk.Image):
badge_name = GObject.property(
type=str, getter=get_badge_name, setter=set_badge_name)
def get_badge_size(self):
return int(_BADGE_SIZE * self.props.pixel_size)
def set_alpha(self, value):
if self._alpha != value:
self._alpha = value