label.py: Fix color change refresh bug

encoder_driver
peterhinch 2023-02-20 09:52:03 +00:00
rodzic 3802038ff2
commit a940c20fd2
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -47,8 +47,8 @@ class Label(Widget):
elif justify == 2: # Right
self.tcol = self.col + self.width - sl
txt = super().value(text) # Sets .draw ensuring refresh
# Redraw even if no text supplied: colors may have changed.
txt = super().value(text)
self.draw = True # Redraw unconditionally: colors may have changed.
self.invert = invert
self.fgcolor = self.def_fgcolor if fgcolor is None else fgcolor
self.bgcolor = self.def_bgcolor if bgcolor is None else bgcolor