Improve exported Kv
[kivyforms.git] / kivyforms / formcanvas.py
index 0f4c18302cb6a97fd4170a960763da1c642ef77f..3c6ab6003aba2f38bdf61d54c302260307e65721 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: