diff --git a/kivyblocks/baseWidget.py b/kivyblocks/baseWidget.py index cf56ea3..f1cd716 100755 --- a/kivyblocks/baseWidget.py +++ b/kivyblocks/baseWidget.py @@ -158,9 +158,12 @@ class Text(Label): ps = self.parent.padding self.width = self.parent.width - ps[0] - ps[2] - self.set_widget_height() + if self.width > 0: + self.set_widget_height() def set_widget_height(self, *args): + if self.width == 0: + return self.text_size = self.width, None rows = len(self.text) * (self.font_size * 0.621) / self.width rows = math.ceil(rows) diff --git a/setup.py b/setup.py index f03ed5e..80f7bc4 100755 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from Cython.Build import cythonize # python setup.py bdist_egg generate a egg file # Release information about eway -version = "0.1.3" +version = "0.1.4" description = "kivy blocks is a tool to build kivy ui with json format uidesc files" author = "yumoqing" email = "yumoqing@icloud.com"