Python kivy.core.window.Window.clearcolor() Examples

The following are 3 code examples of kivy.core.window.Window.clearcolor(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module kivy.core.window.Window , or try the search function .
Example #1
Source File: theming.py    From KivyMD with MIT License 5 votes vote down vote up
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']) 
Example #2
Source File: main.py    From Pyonic-interpreter with GNU General Public License v3.0 5 votes vote down vote up
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 
Example #3
Source File: theming.py    From Blogs-Posts-Tutorials with MIT License 5 votes vote down vote up
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'])