• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python widgetutil.make_surface函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中miro.frontends.widgets.widgetutil.make_surface函数的典型用法代码示例。如果您正苦于以下问题:Python make_surface函数的具体用法?Python make_surface怎么用?Python make_surface使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了make_surface函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self):
     widgetset.CustomSlider.__init__(self)
     self.set_can_focus(False)
     self.set_range(0.0, MAX_VOLUME)
     self.set_increments(0.05, 0.20)
     self.track = widgetutil.make_surface('volume_track')
     self.knob = widgetutil.make_surface('volume_knob')
开发者ID:foxi,项目名称:miro,代码行数:7,代码来源:videobox.py


示例2: _set_from_info

    def _set_from_info(self, guide_info):
        if guide_info is None:
            return

        # XXX This code is a bit ugly, because we want to use pretty defaults for
        # the Miro Guide, but still allow themes to override

        if guide_info.default and guide_info.url in _guide_url_to_title_map:
            self.name = _guide_url_to_title_map[guide_info.url]
        else:
            self.name = guide_info.name

        if guide_info.default and guide_info.url in _guide_url_to_icon_map:
            # one of our default guides
            self.icon_name = _guide_url_to_icon_map[guide_info.url]
            self.icon = widgetutil.make_surface(self.icon_name)
        elif guide_info.faviconIsDefault:
            # theme guide that should use default favicon
            self.icon = widgetutil.make_surface(self.icon_name)
        else:
            # theme guide with a favicon
            surface = imagepool.get_surface(guide_info.favicon)
            if surface.width != 23 or surface.height != 23:
                self.icon = imagepool.get_surface(guide_info.favicon,
                                                  size=(23, 23))
            else:
                self.icon = surface
开发者ID:cool-RR,项目名称:Miro,代码行数:27,代码来源:statictabs.py


示例3: __init__

 def __init__(self, share_id, tab_name, label):
     self.id = u"sharing-%s-%s" % (share_id, tab_name)
     self.share_id = share_id
     self.name = label
     self.type = u'sharing-fake-playlist'
     self.icon = widgetutil.make_surface("icon-%s" % tab_name)
     self.active_icon = widgetutil.make_surface("icon-%s_active" % tab_name)
开发者ID:dankamongmen,项目名称:miro,代码行数:7,代码来源:tablist.py


示例4: __init__

 def __init__(self, tab_class, name, icon_name):
     # "type" is overused, so tab_class refers to the type class
     # attribute of the tab.  e.g. "connect", "feed", ...
     self.tab_class = tab_class
     self.name = name
     self.id = u'%s-base-tab' % tab_class
     self.icon_name = icon_name
     self.thumbnail = resources.path('images/%s.png' % icon_name)
     self.icon = widgetutil.make_surface(self.icon_name)
     self.active_icon = widgetutil.make_surface(self.icon_name + '_active')
开发者ID:pombredanne,项目名称:miro,代码行数:10,代码来源:tablist.py


示例5: __init__

    def __init__(self):
        widgetset.CustomSlider.__init__(self)
        self.set_can_focus(False)
        self.background_surface = widgetutil.ThreeImageSurface('playback_track')
        self.progress_surface = widgetutil.ThreeImageSurface('playback_track_progress')
        self.progress_cursor = widgetutil.make_surface('playback_cursor')
        self.background_surface_inactive = widgetutil.ThreeImageSurface('playback_track_inactive')
        self.progress_surface_inactive = widgetutil.ThreeImageSurface('playback_track_progress_inactive')
        self.progress_cursor_inactive = widgetutil.make_surface('playback_cursor_inactive')

        app.playback_manager.connect('playback-did-progress', self.handle_progress)
        app.playback_manager.connect('selecting-file', self.handle_selecting)
        app.playback_manager.connect('will-play', self.handle_play)
        app.playback_manager.connect('will-stop', self.handle_stop)
        self.disable()
        self.duration = 0
开发者ID:kmshi,项目名称:miro,代码行数:16,代码来源:videobox.py


示例6: __init__

 def __init__(self):
     widgetset.CustomSlider.__init__(self)
     self.set_can_focus(False)
     self.set_range(0.0, 1.0)
     self.set_increments(0.05, 0.20)
     self.track = widgetutil.ThreeImageSurface('device-slider-track')
     self.filled_track = widgetutil.ThreeImageSurface(
         'device-slider-filled')
     self.knob = widgetutil.make_surface('device-slider-knob')
开发者ID:CodeforEvolution,项目名称:miro,代码行数:9,代码来源:devicecontroller.py


示例7: __init__

 def __init__(self):
     widgetset.CustomSlider.__init__(self)
     self.background_surface = widgetutil.ThreeImageSurface("playback_track")
     self.progress_surface = widgetutil.ThreeImageSurface("playback_track_progress")
     self.progress_cursor = widgetutil.make_surface("playback_cursor")
     app.playback_manager.connect("playback-did-progress", self.handle_progress)
     app.playback_manager.connect("selecting-file", self.handle_selecting)
     app.playback_manager.connect("will-play", self.handle_play)
     app.playback_manager.connect("will-stop", self.handle_stop)
     self.disable()
     self.duration = 0
开发者ID:nxmirrors,项目名称:miro,代码行数:11,代码来源:videobox.py


示例8: pack_bubbles

 def pack_bubbles(self, hbox, layout_manager, selected=False):
     if getattr(self.data, 'fake', False):
         return
     self.hbox = None
     if self.updating_frame > -1:
         return TabRenderer.pack_bubbles(self, hbox, layout_manager)
     if getattr(self.data, 'mount', None):
         eject_image = widgetutil.make_surface('icon-eject')
         hotspot = cellpack.Hotspot('eject-device', eject_image)
         alignment = cellpack.Alignment(hotspot, yalign=0.5, yscale=0.0,
                                        xalign=0.0, xscale=0.0,
                                        min_width=20)
         hbox.pack(alignment)
         self.hbox = hbox
开发者ID:codito,项目名称:miro,代码行数:14,代码来源:style.py


示例9: draw

 def draw(self, context, _layout):
     active = self.active and "active" or "inactive"
     left, center, right = "left", "center", "right"
     # visually correct images for more than 2 options not implemented
     if not self.right_edge:
         right = center
     if not self.left_edge:
         left = center
     images = (
         widgetutil.make_surface("toggle-button-{active}_{part}".format(active=active, part=part))
         for part in (left, center, right)
     )
     self.surface.set_images(*images)
     self.surface.draw(context, 0, 0, context.width)
开发者ID:nerdymcgee,项目名称:miro,代码行数:14,代码来源:itemedit.py


示例10: draw

 def draw(self, context, _layout):
     active = self.active and 'active' or 'inactive'
     left, center, right = 'left', 'center', 'right'
     # visually correct images for more than 2 options not implemented
     if not self.right_edge:
         right = center
     if not self.left_edge:
         left = center
     images = (
         widgetutil.make_surface('toggle-button-{active}_{part}'.format(
             active=active,
             part=part,
         )) for part in (left, center, right))
     self.surface.set_images(*images)
     self.surface.draw(context, 0, 0, context.width)
开发者ID:bluezone,项目名称:miro,代码行数:15,代码来源:itemedit.py


示例11: __init__

 def __init__(self):
     self.unwatched = self.downloading = 0
     self.icon = widgetutil.make_surface(self.icon_name)
开发者ID:cool-RR,项目名称:Miro,代码行数:3,代码来源:statictabs.py



注:本文中的miro.frontends.widgets.widgetutil.make_surface函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python widgetutil.pad函数代码示例发布时间:2022-05-27
下一篇:
Python widgetutil.get_feed_info函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap