Commits

Dusty Phillips committed 2b6e69a

Start fleshing out the interface in preparation for demoing layouts.

  • Participants

Comments (0)

Files changed (2)

File kivycatalog.kv

+#:kivy 1.4
+
+<Catalog>:
+    BoxLayout:
+        pos: 0, 0
+        width: root.width
+        height: root.height
+        spacing: 30
+        TabbedPanel:
+            tab_pos: "left_top"
+            size_hint: 1.5, 1.0
+            default_tab_text: "Introduction"
+            default_tab_content: introduction_tab
+
+            Label:
+                id: introduction_tab
+                text: "A super awesome catalog of kivy widgets"
+            TabbedPanel:
+                id: layout_tab
+                default_tab_text: "Information"
+                default_tab_content: layout_information
+
+                Label:
+                    id: layout_information
+                    markup: True
+                    text: "Layouts are containers that automatically position their child widgets according to certain layout rules.\n\n[b]Anchor Layout[/b] aligns children to a border\n[b]Box Layout[/b] arranges children in a vertical or horizontal box.\n[b]Float layout[/b] places boxes according to their pos and size hints\n[b]Grid layout[/b] arranges the children in a matrix\n[b]Stack layout[/b] arranges children vertically or horizontally as far as they will fit."
+
+            TabbedPanelHeader:
+                text: 'Layouts'
+                content: layout_tab
+        Label:
+            id: "language_box"
+            text: "In here will go the kivy language for whatever has been selected"
+from kivy.app import App
+from kivy.uix.button import Button
+from kivy.uix.tabbedpanel import TabbedPanel
+from kivy.uix.widget import Widget
+from kivy.uix.label import Label
+from kivy.factory import Factory
+
+
+class Catalog(Widget):
+    pass
+
+
+class KivyCatalogApp(App):
+    
+    def build(self):
+        return Catalog()
+
+if __name__ == "__main__":
+    KivyCatalogApp().run()