Skip to content

Remove usage of max_glyphs with Label #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions adafruit_clue.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ def __init__( # pylint: disable=too-many-arguments
title = label.Label(
self._font,
text=title,
max_glyphs=60,
color=title_color,
scale=title_scale,
)
Expand All @@ -137,7 +136,7 @@ def __getitem__(self, item):

def add_text_line(self, color=0xFFFFFF):
"""Adds a line on the display of the specified color and returns the label object."""
text_label = self._label.Label(self._font, text="", max_glyphs=45, color=color)
text_label = self._label.Label(self._font, text="", color=color)
text_label.x = 0
text_label.y = self._y
self._y = text_label.y + 13
Expand Down
8 changes: 4 additions & 4 deletions examples/advanced_examples/clue_ams_remote_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@

group = displayio.Group()

title = label.Label(font=arial16, x=15, y=25, text="_", color=0xFFFFFF, max_glyphs=30)
title = label.Label(font=arial16, x=15, y=25, text="_", color=0xFFFFFF)
group.append(title)

artist = label.Label(font=arial16, x=15, y=50, text="_", color=0xFFFFFF, max_glyphs=30)
artist = label.Label(font=arial16, x=15, y=50, text="_", color=0xFFFFFF)
group.append(artist)

album = label.Label(font=arial16, x=15, y=75, text="_", color=0xFFFFFF, max_glyphs=30)
album = label.Label(font=arial16, x=15, y=75, text="_", color=0xFFFFFF)
group.append(album)

player = label.Label(font=arial16, x=15, y=100, text="_", color=0xFFFFFF, max_glyphs=30)
player = label.Label(font=arial16, x=15, y=100, text="_", color=0xFFFFFF)
group.append(player)

volume = Rect(15, 170, 210, 20, fill=0x0, outline=0xFFFFFF)
Expand Down