本文整理汇总了Python中kivy.core.window.Window.clearcolor方法的典型用法代码示例。如果您正苦于以下问题:Python Window.clearcolor方法的具体用法?Python Window.clearcolor怎么用?Python Window.clearcolor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kivy.core.window.Window
的用法示例。
在下文中一共展示了Window.clearcolor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set_clearcolor_by_theme_style
# 需要导入模块: from kivy.core.window import Window [as 别名]
# 或者: from kivy.core.window.Window import clearcolor [as 别名]
def set_clearcolor_by_theme_style(self, theme_style):
if theme_style == 'Light':
Window.clearcolor = get_color_from_hex(
colors['Light']['Background'])
elif theme_style == 'Dark':
Window.clearcolor = get_color_from_hex(
colors['Dark']['Background'])
示例2: build
# 需要导入模块: from kivy.core.window import Window [as 别名]
# 或者: from kivy.core.window.Window import clearcolor [as 别名]
def build(self):
self.settings_retrieved = False # used to prevent setting
# updates until they have
# been fetched from the file
Window.clearcolor = (1, 1, 1, 1)
Window.softinput_mode = 'pan'
self.parse_args()
Clock.schedule_once(self.android_setup, 0)
Clock.schedule_once(self.retrieve_settings, 0)
if platform == 'android':
settings_path = '../settings.json'
else:
settings_path = join(abspath(dirname(__file__)), '..', 'settings.json')
self.store = SettingsStore(settings_path)
# Retrieve the input throttling argument so that it can be
# passed to the service immediately
self.setting__throttle_output = self.store.get(
'setting__throttle_output',
{'value': self.setting__throttle_output_default})['value']
Window.bind(on_keyboard=self.key_input)
for attr in dir(self):
if attr.startswith('setting__') and not attr.endswith('_default'):
self.bind(**{attr: partial(self.setting_updated, attr)})
self.manager = Manager()
return self.manager
示例3: set_clearcolor_by_theme_style
# 需要导入模块: from kivy.core.window import Window [as 别名]
# 或者: from kivy.core.window.Window import clearcolor [as 别名]
def set_clearcolor_by_theme_style(self, theme_style):
if theme_style == 'Light':
Window.clearcolor = get_color_from_hex(
colors['Light']['Background'])
elif theme_style == 'Dark':
Window.clearcolor = get_color_from_hex(
colors['Dark']['Background'])