mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Remove redundant refresh calls in border property setter
This commit is contained in:
@@ -80,8 +80,7 @@ class BasicApp(App):
|
||||
self.focused.display = not self.focused.display
|
||||
|
||||
def action_toggle_border(self):
|
||||
# self.focused.styles.border = [("solid", "red"), ("dashed", "white")]
|
||||
self.focused.styles.offset = (12, "1x")
|
||||
self.focused.styles.border = ("solid", "red")
|
||||
|
||||
|
||||
BasicApp.run(css_file="uber.css", log="textual.log", log_verbosity=1)
|
||||
|
||||
@@ -317,14 +317,12 @@ class BorderProperty:
|
||||
clear_rule(right)
|
||||
clear_rule(bottom)
|
||||
clear_rule(left)
|
||||
obj.refresh(layout=self._layout)
|
||||
return
|
||||
if isinstance(border, tuple):
|
||||
setattr(obj, top, border)
|
||||
setattr(obj, right, border)
|
||||
setattr(obj, bottom, border)
|
||||
setattr(obj, left, border)
|
||||
obj.refresh(layout=self._layout)
|
||||
return
|
||||
|
||||
count = len(border)
|
||||
|
||||
Reference in New Issue
Block a user