Skip to content

Conversation

@kattni
Copy link

@kattni kattni commented Mar 21, 2019

No description provided.

@kattni kattni requested a review from ladyada March 21, 2019 19:52

from micropython import const
import displayio
from adafruit_display_text.text_area import TextArea
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adafruit_display_text should refer to Label, instead of TextArea (https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/releases/tag/2.0.0)

Defaults to RECT.
:param fill_color: The color to fill the button. Defaults to 0xFFFFFF.
:param outline_color: The color of the outline of the button.
:param label: The button label. Defaults to 0x0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

label is the button text that appears inside it, by default nothing is displayed

dims = label_font.text_bounding_box(label)
if dims[2] >= width or dims[3] >= height:
raise RuntimeError("Button not large enough for label")
self.label = TextArea(label_font, text=label)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be Label not TextArea, too

@ladyada ladyada merged commit 07c588b into adafruit:master Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants