本文整理汇总了Python中kivy.uix.anchorlayout.AnchorLayout.size_hint方法的典型用法代码示例。如果您正苦于以下问题:Python AnchorLayout.size_hint方法的具体用法?Python AnchorLayout.size_hint怎么用?Python AnchorLayout.size_hint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kivy.uix.anchorlayout.AnchorLayout
的用法示例。
在下文中一共展示了AnchorLayout.size_hint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from kivy.uix.anchorlayout import AnchorLayout [as 别名]
# 或者: from kivy.uix.anchorlayout.AnchorLayout import size_hint [as 别名]
def __init__(self, app, parent, title, **kw):
logging.info('PysolAboutDialog:')
super(PysolAboutDialog, self).__init__()
self._url = kw['url']
logging.info('PysolAboutDialog: txt=%s' % title)
text = kw['text']
text = text + '\n' + self._url
logging.info('PysolAboutDialog: txt=%s' % text)
text = text + '\n\n' + 'Adaptation to Kivy/Android\n' + \
' Copyright (C) (2016-17) LB'
self.parent = parent
self.app = app
self.window = None
self.running = False
self.status = 1 # -> von help.py so benötigt
self.button = 0 # -> von help.py so benötigt
# bestehenden Dialog rezyklieren.
logging.info('PysolAboutDialog: 1')
onlyone = PysolAboutDialog.AboutDialog
if (onlyone and onlyone.running):
return
if (onlyone):
onlyone.parent.pushWork('AboutDialog', onlyone.window)
onlyone.running = True
return
# neuen Dialog aufbauen.
window = LTopLevel(parent, title, size_hint=(1.0, 1.0))
window.titleline.bind(on_press=self.onClick)
self.parent.pushWork('AboutDialog', window)
self.window = window
self.running = True
PysolAboutDialog.AboutDialog = self
if kw['image']:
image = LImage(texture=kw['image'].texture)
image.size_hint = (1, 0.8)
al = AnchorLayout()
al.add_widget(image)
al.size_hint = (1, 0.3)
window.content.add_widget(al)
label = FText(text=text, halign='center', size_hint=(1, 1))
window.content.add_widget(label)
'''