From fe788691d94ab434a3198a692505222b034c54ec Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Sun, 31 Mar 2013 11:59:37 +0200 Subject: [PATCH] fix kivycatalog --- examples/demo/kivycatalog/kivycatalog.kv | 8 ++++++++ examples/demo/kivycatalog/main.py | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/demo/kivycatalog/kivycatalog.kv b/examples/demo/kivycatalog/kivycatalog.kv index 929d26b3d..b13e96a44 100644 --- a/examples/demo/kivycatalog/kivycatalog.kv +++ b/examples/demo/kivycatalog/kivycatalog.kv @@ -7,6 +7,14 @@ on_press: root.parent.parent.parent.show_kv(*args) state: ctx.state if hasattr(ctx, "state") else "normal" +: + canvas.before: + Color: + rgb: 0, 0, 0 + Rectangle: + pos: self.pos + size: self.size + : language_box: language_box screen_manager: screen_manager diff --git a/examples/demo/kivycatalog/main.py b/examples/demo/kivycatalog/main.py index b667f79af..ca554fbb3 100644 --- a/examples/demo/kivycatalog/main.py +++ b/examples/demo/kivycatalog/main.py @@ -115,8 +115,7 @@ class Catalog(BoxLayout): self.screen_manager.current = object.text - with open(self.screen_manager.current_screen.content.children[ - 0].kv_file) as file: + with open(self.screen_manager.current_screen.children[0].kv_file) as file: self.language_box.text = file.read() # reset undo/redo history self.language_box.reset_undo() @@ -132,7 +131,7 @@ class Catalog(BoxLayout): on the kv file the user entered. If there is an error in their kv syntax, show a nice popup.''' - kv_container = self.screen_manager.current_screen.content.children[0] + kv_container = self.screen_manager.current_screen.children[0] try: parser = Parser(content=self.language_box.text.encode('utf8')) kv_container.clear_widgets()