From 6621d9583fe2332932238d10b2cf328292d5c154 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 4 Dec 2021 23:41:12 +0800 Subject: [PATCH] bugfix --- kivyblocks/clickable.py | 9 +++------ kivyblocks/typewriterbox.py | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/kivyblocks/clickable.py b/kivyblocks/clickable.py index bdb1b4a..2f75cc9 100644 --- a/kivyblocks/clickable.py +++ b/kivyblocks/clickable.py @@ -51,6 +51,7 @@ class ToggleText(ClickableText): "on_css":"selected", "off_css":"normal" }) + """ select_state = BooleanProperty(False) on_css = StringProperty('default') @@ -59,7 +60,7 @@ class ToggleText(ClickableText): super(ToggleText, self).__init__(**kw) def on_press(self, o=None): - if self.select_state = if self.select_state?False else True + self.select_state = False if self.select_state else True def on_select_state(self, o, f): if f: @@ -90,7 +91,7 @@ class ToggleImage(ClickableImage): super(ToggleImage, self).__init__(**kw) def on_press(self, o): - self.select_state = if self.select_state ? False, True + self.select_state = False if self.select_state else True def on_select_state(self, o, f): if self.img_w: @@ -104,7 +105,3 @@ class ToggleImage(ClickableImage): else: self.img_w = AsyncImage(source=self.source) -class Select(VBox): - """ - - """ diff --git a/kivyblocks/typewriterbox.py b/kivyblocks/typewriterbox.py index 95fe1ee..8ccc43b 100644 --- a/kivyblocks/typewriterbox.py +++ b/kivyblocks/typewriterbox.py @@ -30,7 +30,7 @@ class TypeWriterBox(WidgetCSS, WidgetReady, Widget): def add_veritcal_box(self): box = BoxLayout(orientation='vertical', size_hint_y=None) - box.bind(minimum_height = box.setter('height') + box.bind(minimum_height = box.setter('height')) super(TypeWriterBox, self).add_widget(box) return box