def __init__(self, name):
Gtk.Image.__init__(self)
context = self.get_style_context()
context.add_class("symbolic-icon")
# get base dir
SYMBOLIC_DIR = os.path.join(
softwarecenter.paths.datadir, "ui/gtk3/art/icons/")
drop_shadow_path = SYMBOLIC_DIR + self.DROPSHADOW % name
self.drop_shadow = cairo.ImageSurface.create_from_png(drop_shadow_path)
icon_path = SYMBOLIC_DIR + self.ICON % name
self.icon = cairo.ImageSurface.create_from_png(icon_path)
self.drop_shadow_x_offset = 0
self.drop_shadow_y_offset = 1
self.connect("draw", self.on_draw, self.drop_shadow, self.icon,
self.drop_shadow_x_offset, self.drop_shadow_y_offset)
评论列表
文章目录