Skip to content

Commit 36c9c76

Browse files
Remove max_size parameter
1 parent 4745233 commit 36c9c76

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

adafruit_display_text/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def __init__(
217217
label_direction: str = "LTR",
218218
**kwargs,
219219
) -> None:
220-
super().__init__(max_size=1, x=x, y=y, scale=1, **kwargs)
220+
super().__init__(x=x, y=y, scale=1)
221221

222222
self._font = font
223223
self._ascent, self._descent = self._get_ascent_descent()

adafruit_display_text/bitmap_label.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def __init__(self, font, **kwargs) -> None:
9191
super().__init__(font, **kwargs)
9292

9393
self.local_group = displayio.Group(
94-
max_size=1, scale=kwargs.get("scale", 1)
94+
scale=kwargs.get("scale", 1)
9595
) # local_group holds the tileGrid and sets the scaling
9696
self.append(
9797
self.local_group

adafruit_display_text/label.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,15 @@ def __init__(self, font, **kwargs) -> None:
8181
text = kwargs.get("text", "")
8282

8383
if not max_glyphs and not text:
84-
raise RuntimeError("Please provide a max size, or initial text")
84+
raise RuntimeError("Please provide a max_glyphs, or initial text")
8585
self._tab_replacement = kwargs.get("tab_replacement", (4, " "))
8686
self._tab_text = self._tab_replacement[1] * self._tab_replacement[0]
8787
text = self._tab_text.join(text.split("\t"))
8888
if not max_glyphs:
8989
max_glyphs = len(text)
90-
# add one to max_size for the background bitmap tileGrid
9190

9291
# local_group will set the scale
93-
self.local_group = displayio.Group(
94-
max_size=max_glyphs + 1, scale=kwargs.get("scale", 1)
95-
)
92+
self.local_group = displayio.Group(scale=kwargs.get("scale", 1))
9693
self.append(self.local_group)
9794

9895
self.width = max_glyphs

0 commit comments

Comments
 (0)