From 17d33fc7ae7e907dd13fd713a740e4f12e7b5b72 Mon Sep 17 00:00:00 2001 From: Markus Towara Date: Thu, 22 Oct 2020 19:46:44 +0200 Subject: [PATCH 1/2] rename _width and _height attributes fix for #17 --- adafruit_progressbar.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/adafruit_progressbar.py b/adafruit_progressbar.py index 6af3b19..f09e46b 100755 --- a/adafruit_progressbar.py +++ b/adafruit_progressbar.py @@ -80,8 +80,8 @@ def __init__( self._palette[1] = outline_color self._palette[2] = bar_color - self._width = width - self._height = height + self._bar_width = width + self._bar_height = height self._progress_val = 0.0 self.progress = self._progress_val @@ -146,14 +146,14 @@ def width(self): """The width of the progress bar. In pixels, includes the border. """ - return self._width + return self._bar_width @property def height(self): """The height of the progress bar. In pixels, includes the border. """ - return self._height + return self._bar_height @fill.setter def fill(self, color): From f6a9b8e29c0d1cd0bc0330580fbe330e271c0128 Mon Sep 17 00:00:00 2001 From: Markus Towara Date: Fri, 23 Oct 2020 00:39:46 +0200 Subject: [PATCH 2/2] Update adafruit_progressbar.py add requested comment --- adafruit_progressbar.py | 1 + 1 file changed, 1 insertion(+) diff --git a/adafruit_progressbar.py b/adafruit_progressbar.py index f09e46b..9b4623b 100755 --- a/adafruit_progressbar.py +++ b/adafruit_progressbar.py @@ -80,6 +80,7 @@ def __init__( self._palette[1] = outline_color self._palette[2] = bar_color + # _width and _height are already in use for blinka TileGrid self._bar_width = width self._bar_height = height