adafruit / adafruit/Adafruit_CircuitPython_DisplayIO_Layout
tab_layout returns AttributeError for width when using HSTX display
- Lingua principale
- Python
- Stelle
- 13
- Fork
- 16
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Using Feather RP2350 with an HSTX display running the Tab Layout Simple test with display is set up using:
`if hasattr(supervisor. Runtime, "display") and supervisor.runtime.display is not None:
# use the built-in HSTX display for Metro RP2350
display = supervisor.runtime.display`
Getting error:
`File "/lib/adafruit_displayio_layout/layouts/tab_layout.py", line 203, in add_content
File "/lib/adafruit_displayio_layout/layouts/tab_layout.py", line 152, in _draw_tabs
AttributeError: 'NoneType' object has no attribute 'width'`
I was able to get it to work by editing the file - see attached screenshot.
Not sure if this will break boards with built in display.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia con il test Tab Layout Simple che fallisce usando il display Feather RP2350 HSTX, quindi esamina lib/adafruit_displayio_layout/layouts/tab_layout.py in _draw_tabs (riga 152) e add_content (riga 203), e aggiungi la modifica. Riproduci l'errore width di NoneType e verifica che la correzione funzioni con il display integrato senza compromettere le schede che hanno già un display.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- embedded-iot
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100