diff --git a/full_updater/ui/log_panel.py b/full_updater/ui/log_panel.py index 0ccfb15..1022d1c 100644 --- a/full_updater/ui/log_panel.py +++ b/full_updater/ui/log_panel.py @@ -23,21 +23,21 @@ class LogPanel(Vertical): def __init__(self): super().__init__() - self.log = None + self._log_widget = None def compose(self): with Horizontal(id="log-toolbar"): yield Button("⬅ Retour", id="log-back") - self.log = RichLog(id="log-view", highlight=True) - yield self.log + self._log_widget = RichLog(id="log-view", highlight=True) + yield self._log_widget def write(self, line: str): - if self.log: - self.log.write(line) + if self._log_widget: + self._log_widget.write(line) def clear(self): - if self.log: - self.log.clear() + if self._log_widget: + self._log_widget.clear() def on_button_pressed(self, event: Button.Pressed): if event.button.id == "log-back":