mirror of https://github.com/kivy/kivy.git
No need to explicitly register subclasses of Widget in Kivy 1.5
This commit is contained in:
parent
d9bf952eba
commit
810cd555a9
|
@ -16,17 +16,6 @@ CONTAINER_CLASSES = [c[:-3] for c in os.listdir('container_kvs')
|
|||
if c.endswith('.kv')]
|
||||
|
||||
|
||||
def factoryable(cls):
|
||||
'''Class decorator that automatically records
|
||||
the resultant class in the Factory.
|
||||
This allows the class to be accessed
|
||||
inside the .kv language file in the Builder.
|
||||
'''
|
||||
Factory.register(cls.__name__, cls)
|
||||
return cls
|
||||
|
||||
|
||||
@factoryable
|
||||
class Container(BoxLayout):
|
||||
'''A container is essentially a class that loads its root from a known
|
||||
.kv file.
|
||||
|
@ -55,7 +44,6 @@ for class_name in CONTAINER_CLASSES:
|
|||
globals()[class_name] = type(class_name, (Container,), {})
|
||||
|
||||
|
||||
@factoryable
|
||||
class KivyRenderTextInput(TextInput):
|
||||
def _keyboard_on_key_down(self, window, keycode, text, modifiers):
|
||||
is_osx = sys.platform == 'darwin'
|
||||
|
|
Loading…
Reference in New Issue