toolbar.py 文件源码

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

项目:ghostlines-robofont 作者: ghostlines 项目源码 文件源码
def add(self, item, index=None):
        image_path = os.path.join(self.resource_path, item.icon)
        image = NSImage.alloc().initByReferencingFile_(image_path)

        new_item = dict(
            itemIdentifier = item.identifier,
            label = item.label,
            callback = item.dispatch,
            imageObject = image
        )

        self.items.insert(index, new_item)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号