Skip to content

Instantly share code, notes, and snippets.

@tshirtman
Created July 14, 2012 20:49
Show Gist options
  • Select an option

  • Save tshirtman/3113316 to your computer and use it in GitHub Desktop.

Select an option

Save tshirtman/3113316 to your computer and use it in GitHub Desktop.
from kivy.app import App
from kivy.factory import Factory
from kivy.config import Config
from kivy.clock import Clock
from functools import partial
def callback(instance, *args):
print 'icon change'
instance.icon = 'icon2.png'
Config.set('kivy', 'window_icon', instance.get_application_icon())
class BejotoApp(App):
icon = 'icon.png'
title = 'Test icon'
def build(self):
Config.set('kivy', 'window_icon', self.get_application_icon())
Clock.schedule_once(partial(callback, self), 2)
return Factory.Button()
if __name__ == '__main__':
BejotoApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment