本文整理汇总了Python中application.Application.visible方法的典型用法代码示例。如果您正苦于以下问题:Python Application.visible方法的具体用法?Python Application.visible怎么用?Python Application.visible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类application.Application
的用法示例。
在下文中一共展示了Application.visible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: show_application
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import visible [as 别名]
def show_application(self, application, fullscreen, context):
"""
Render <application> widget with the given name and the given context.
"""
if isinstance(application, (str, unicode)):
tmp = self.theme.application.get(application)
if not tmp:
return log.error('no application named %s', application)
application = tmp(size=self.size, context=context)
self.add_layer(application, sibling=self.applications_idx)
elif application is None:
application = Application(self.size, [], context=context)
self.add_layer(application, sibling=self.applications_idx)
else:
application.visible = True
self.applications.remove(application)
# TODO: add show/hide/remove/unparent/whatever here
for l in self.layer:
l.visible = not fullscreen
if l == self.applications_idx:
break
if self.applications:
self.applications[-1].visible = False
self.applications.append(application)
return application