symbolic_icons.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:x-mario-center 作者: fossasia 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号