diff --git a/src/chat_control.py b/src/chat_control.py index 03a40c1a4..ffa3e7abe 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -426,8 +426,10 @@ class ChatControlBase(MessageControl): if default_bg or default_fg: self._on_style_set_event(banner_name_label, None, default_fg, default_bg) - self._on_style_set_event(self.banner_status_label, None, default_fg, - default_bg) + if self.banner_status_label.get_property('window'): + # Widget is realized + self._on_style_set_event(self.banner_status_label, None, default_fg, + default_bg) def disconnect_style_event(self, widget): # Try to find the event_id