Commits

Dusty Phillips committed b6af083

Add a playground for pasting arbitrary kv language.

Comments (0)

Files changed (2)

container_kvs/PlaygroundContainer.kv

+#:kivy 1.4
+
+Label:
+    text: "Paste your Kivy code in here and render"
             default_tab_text: "Introduction"
             default_tab_content: introduction_tab
 
-            Label:
+            Accordion:
                 id: introduction_tab
-                text_size: self.width-60, self.height-60
-                valign: "middle"
-                text: "The Kivy Catalog is an interactive showcase of Kivy Widgets defined in the Kivy language. For each widget you see, you can directly edit the .kv language syntax to see what effects your changes have on the widget.\n\nThis code is still in pretty alpha state. Most widgets haven't been represented yet. But it does seem to work. If you feel like adding widgets to the showcase, pull requests are welcome!"
+                AccordionItem:
+                    on_collapse: root.show_kv(*args)
+                    title: "Playground"
+                    kv_container: playground
+                    PlaygroundContainer:
+                        id: playground
+                AccordionItem:
+                    title: "Welcome"
+                    Label:
+                        text_size: self.width-60, self.height-60
+                        valign: "middle"
+                        text: "The Kivy Catalog is an interactive showcase of Kivy Widgets defined in the Kivy language. For each widget you see, you can directly edit the .kv language syntax to see what effects your changes have on the widget.\n\nThis code is still in pretty alpha state. Most widgets haven't been represented yet. But it does seem to work. If you feel like adding widgets to the showcase, pull requests are welcome!"
 
             TabbedPanelHeader:
                 text: 'Layouts'