Skip to content

Commit da9feb8

Browse files
committed
Fix a max_glyphs issue when setting text longer
1 parent e110da7 commit da9feb8

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

adafruit_matrixportal/matrixportal.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,19 +251,14 @@ def set_text(self, val, index=0):
251251
if not self._text:
252252
self.add_text()
253253
string = str(val)
254-
if not string:
255-
max_glyphs = 50
256-
else:
257-
max_glyphs = len(string)
258254
if self._text_maxlen[index]:
259255
string = string[: self._text_maxlen[index]]
260256
print("text index", self._text[index])
261257
index_in_splash = None
262258
if self._text[index] is not None:
263259
print("Replacing text area with :", string)
264-
self._text[index].text = string
265260
index_in_splash = self.splash.index(self._text[index])
266-
self._text[index] = Label(self._text_font, text=string, max_glyphs=max_glyphs)
261+
self._text[index] = Label(self._text_font, text=string)
267262
self._text[index].color = self._text_color[index]
268263
self._text[index].x = self._text_position[index][0]
269264
self._text[index].y = self._text_position[index][1]

0 commit comments

Comments
 (0)