games_nebula.py 文件源码

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

项目:games_nebula 作者: yancharkin 项目源码 文件源码
def update_queue_banners(self):

        if self.goglib_box_width != 1:
            new_downloads_pixbuf_width = (self.goglib_box_width -  60) / 5
        else:
            new_downloads_pixbuf_width = (self.mylib_box_width -  60) / 5

        downloads_pixbuf_scale_level = float(new_downloads_pixbuf_width)/518
        new_downloads_pixbuf_height = 240 * downloads_pixbuf_scale_level

        if queue_game_image_list:
            for i in range(0, len(queue_game_image_list)):

                if os.path.exists(data_dir + '/images/goglib_banners/' + queue_game_image_list[i].get_name() + '.jpg'):
                    pixbuf = GdkPixbuf.Pixbuf.new_from_file(data_dir + '/images/goglib_banners/' + queue_game_image_list[i].get_name() + '.jpg')
                else:
                    pixbuf = GdkPixbuf.Pixbuf.new_from_file(data_dir + '/images/mylib_banners/' + queue_game_image_list[i].get_name() + '.jpg')

                pixbuf = pixbuf.scale_simple(new_downloads_pixbuf_width, new_downloads_pixbuf_height, InterpType.BILINEAR)
                queue_game_image_list[i].set_from_pixbuf(pixbuf)

    #~ def timer_check_for_new_games(self):
        #~ self.check_for_new_games()
        #~ GObject.timeout_add(30000, self.timer_check_for_new_games)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号