Skip to content

Remove max_size and max_glyphs from CircuitPython examples #1603

@lesamouraipourpre

Description

@lesamouraipourpre

The max_size parameter on displayio.Group is currently ignored and is (hopefully) going to be removed before 7.0.0 final.
The libraries are having this parameter removed from them - adafruit/circuitpython#4959

Edit: I've update the grep to look for max_glyphs related to DIsplay_Text Label as well.

This issue is intended as a tracking issue as the Learn Guide code is worked through
{ grep -r "Group.*max_size" * && grep -r "max_glyphs" * ; } | sed -e "s/\/.*//" | sort | uniq to give directories
{ grep -r "Group.*max_size" * && grep -r "max_glyphs" * ; } | grep -v "_JEplayer_" | sort gives (updated 2021/08/06 14:20 BST)

Matrix_On_Air/matrix_on_air.py:    deco_font, color=color[1], text="AIR", max_glyphs=6
Matrix_On_Air/matrix_on_air.py:    deco_font, color=color[3], text="OFF", max_glyphs=6
Matrix_On_Air/matrix_on_air.py:group = displayio.Group(max_size=22)
PyPortal_Calculator/code.py:calc_display = Label(font, text="0", color=BLACK, max_glyphs=MAX_DIGITS)
PyPortal_Calculator/code.py:calc_group = displayio.Group(max_size=25)
PyPortal_Calculator/titano_code.py:calc_display = Label(font, text="0", color=BLACK, max_glyphs=MAX_DIGITS)
PyPortal_Calculator/titano_code.py:calc_group = displayio.Group(max_size=25)
PyPortal_Titano_Weather_Station/openweather_graphics.py:        self.date_text = Label(self.medium_font, max_glyphs=60)
PyPortal_Titano_Weather_Station/openweather_graphics.py:        self.description_text = Label(self.small_font, max_glyphs=60)
PyPortal_Titano_Weather_Station/openweather_graphics.py:                    self.holiday_text = Label(self.medium_font, max_glyphs=60)
PyPortal_Titano_Weather_Station/openweather_graphics.py:        self._icon_group = displayio.Group(max_size=1)
PyPortal_Titano_Weather_Station/openweather_graphics.py:        self.main_text = Label(self.weather_font, max_glyphs=20)
PyPortal_Titano_Weather_Station/openweather_graphics.py:        self.temp_text = Label(self.large_font, max_glyphs=6)
PyPortal_Titano_Weather_Station/openweather_graphics.py:        self._text_group = displayio.Group(max_size=12)
PyPortal_Titano_Weather_Station/openweather_graphics.py:        self.time_text = Label(self.medium_font, max_glyphs=8)

If the associated Learn Guide text needs updated I will make a comment on any created PRs. Is there a better way to do this @kattni or @makermelissa ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions