From bc70c468180e66f0e1f784a747f7e2eb95f2989f Mon Sep 17 00:00:00 2001 From: FoamyGuy Date: Wed, 22 Jul 2020 20:15:44 -0500 Subject: [PATCH 1/2] dont create a background bitmap if background_color is None --- adafruit_display_text/label.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adafruit_display_text/label.py b/adafruit_display_text/label.py index 251ba17..f065e29 100755 --- a/adafruit_display_text/label.py +++ b/adafruit_display_text/label.py @@ -292,7 +292,8 @@ def _update_text( self._text = new_text self._boundingbox = (left, top, left + right, bottom - top) - self._update_background_color(self._background_color) + if self.background_color: + self._update_background_color(self._background_color) @property def bounding_box(self): From 1649a68d6072f056b4f0d0618f1351ecfe16b292 Mon Sep 17 00:00:00 2001 From: FoamyGuy Date: Thu, 23 Jul 2020 12:24:12 -0500 Subject: [PATCH 2/2] fix background color check for black color 0 --- adafruit_display_text/label.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_display_text/label.py b/adafruit_display_text/label.py index f065e29..dc4608e 100755 --- a/adafruit_display_text/label.py +++ b/adafruit_display_text/label.py @@ -292,7 +292,7 @@ def _update_text( self._text = new_text self._boundingbox = (left, top, left + right, bottom - top) - if self.background_color: + if self.background_color is not None: self._update_background_color(self._background_color) @property