Skip to content

Commit ab0158d

Browse files
authored
Merge pull request adafruit#74 from FoamyGuy/no_bitmap_when_background_none
dont create a background bitmap if background_color is None
2 parents d855e29 + 1649a68 commit ab0158d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

adafruit_display_text/label.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ def _update_text(
299299
self._text = new_text
300300
self._boundingbox = (left, top, left + right, bottom - top)
301301

302-
self._update_background_color(self._background_color)
302+
if self.background_color is not None:
303+
self._update_background_color(self._background_color)
303304

304305
@property
305306
def bounding_box(self):

0 commit comments

Comments
 (0)