Skip to content

Commit 870643a

Browse files
committed
add leading underscore to _transparent_background
1 parent 46b04fe commit 870643a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

adafruit_display_text/label.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ def __init__(self, font, *, x=0, y=0, text=None, max_glyphs=None, color=0xffffff
7272

7373
self.palette = displayio.Palette(2)
7474
if not background_color:
75-
self.transparent_background = True
75+
self._transparent_background = True
7676
self.palette.make_transparent(0)
7777
else:
78-
self.transparent_background = False
78+
self._transparent_background = False
7979
self.palette[0] = background_color
8080
self.palette[1] = color
8181

@@ -176,7 +176,7 @@ def color(self, new_color):
176176
@property
177177
def background_color(self):
178178
"""Color of the background as an RGB hex number."""
179-
if not self.transparent_background:
179+
if not self._transparent_background:
180180
return self.palette[0]
181181
return None
182182

@@ -185,11 +185,11 @@ def background_color(self, new_color):
185185
if new_color or new_color == 0x000000:
186186
self.palette[0] = new_color
187187
self.palette.make_opaque(0)
188-
self.transparent_background = False
188+
self._transparent_background = False
189189
else:
190190
self.palette[0] = 0
191191
self.palette.make_transparent(0)
192-
self.transparent_background = True
192+
self._transparent_background = True
193193

194194
@property
195195
def text(self):

0 commit comments

Comments
 (0)