Improve exported Kv
authorJavier Sancho <jsf@jsancho.org>
Thu, 26 Jul 2018 10:13:49 +0000 (12:13 +0200)
committerJavier Sancho <jsf@jsancho.org>
Thu, 26 Jul 2018 10:13:49 +0000 (12:13 +0200)
kivyforms/formcanvas.py

index 0f4c183..3c6ab60 100644 (file)
@@ -128,6 +128,8 @@ class FormCanvas(BoxLayout):
             height=self.widgets_height,
             size_hint=self.widgets_size_hint
         )
+        widget.height = self.widgets_height
+        widget.size_hint = self.widgets_size_hint
         g.add_widget(widget)
         self._canvas.add_widget(g)
 
@@ -229,7 +231,7 @@ class FormCanvas(BoxLayout):
                 stack.append(widget)
 
                 # Widget attributes
-                for attr in ('height', 'size_hint', 'text'):
+                for attr in ('height', 'size_hint', 'text', 'spacing'):
                     if hasattr(widget, attr):
                         value = getattr(widget, attr)
                         if type(value) is str: