當前位置: 首頁>>代碼示例>>Python>>正文


Python Window.clearcolor方法代碼示例

本文整理匯總了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']) 
開發者ID:kivymd,項目名稱:KivyMD,代碼行數:9,代碼來源:theming.py

示例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 
開發者ID:inclement,項目名稱:Pyonic-interpreter,代碼行數:35,代碼來源:main.py

示例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']) 
開發者ID:kiok46,項目名稱:Blogs-Posts-Tutorials,代碼行數:9,代碼來源:theming.py


注:本文中的kivy.core.window.Window.clearcolor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。