fanim_timeline.py 文件源码

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

项目:gimp-fanim 作者: douglasvini 项目源码 文件源码
def _setup(self):
        self.thumbnail = gtk.Image()
        self.label = gtk.Label(self.layer.name)
        # creating the fix button, to anchor background frames.
        self._fix_button = Utils.toggle_button_stock(gtk.STOCK_MEDIA_RECORD,20)
        self._fix_button.set_tooltip_text("toggle fixed visibility.")

        # update fixed variable
        self.fixed = Utils.is_frame_fixed(self.layer)
        #images
        pin_img = gtk.Image()
        pin_img.set_from_stock(gtk.STOCK_YES,20)
        pin_img2 = gtk.Image()
        pin_img2.set_from_stock(gtk.STOCK_MEDIA_RECORD,20)

        self._fix_button_images = [pin_img,pin_img2]

        ## connect
        self._fix_button.connect('clicked',self.on_toggle_fix)

        if self.fixed:
            self._fix_button.set_image(self._fix_button_images[0])
            self._fix_button.set_active(True)
        else :
            self._fix_button.set_image(self._fix_button_images[1])
            self._fix_button.set_active(False)

        frame = gtk.Frame()
        layout = gtk.VBox()
        # add frame to this widget
        self.add(frame)

        # add layout manager to the frame
        frame.add(layout)

        layout.pack_start(self.label)
        layout.pack_start(self._fix_button)
        layout.pack_start(self.thumbnail)
        self._get_thumb_image()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号