kopia lustrzana https://github.com/peterhinch/micropython-micro-gui
label.py: Fix bug where bgcolor not rendered outside text boundary.
rodzic
b40d698fbc
commit
df8dbf7fb7
|
@ -57,7 +57,7 @@ class Label(Widget):
|
||||||
self.bdcolor = self.def_bdcolor if bdcolor is None else bdcolor
|
self.bdcolor = self.def_bdcolor if bdcolor is None else bdcolor
|
||||||
return txt
|
return txt
|
||||||
|
|
||||||
def show(self):
|
def show(self): # Passive: no need to test show return value.
|
||||||
if super().show(): # Draw or erase border
|
super().show(False) # Honour background. Draw or erase border
|
||||||
if isinstance(txt := super().value(), str):
|
if isinstance(txt := super().value(), str):
|
||||||
display.print_left(self.writer, self.tcol, self.row, txt, self.fgcolor, self.bgcolor, self.invert)
|
display.print_left(self.writer, self.tcol, self.row, txt, self.fgcolor, self.bgcolor, self.invert)
|
||||||
|
|
Ładowanie…
Reference in New Issue