Skip to content
Merged
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
7 changes: 2 additions & 5 deletions adafruit_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _check_color(color):
return color


class Button():
class Button(displayio.Group):
# pylint: disable=too-many-instance-attributes, too-many-locals
"""Helper class for creating UI buttons for ``displayio``.

Expand Down Expand Up @@ -87,6 +87,7 @@ def __init__(self, *, x, y, width, height, name=None, style=RECT,
label=None, label_font=None, label_color=0x0,
selected_fill=None, selected_outline=None,
selected_label=None):
super().__init__()
self.x = x
self.y = y
self.width = width
Expand Down Expand Up @@ -135,10 +136,6 @@ def __init__(self, *, x, y, width, height, name=None, style=RECT,

self.label = label

# else: # ok just a bounding box
# self.bodyshape = displayio.Shape(width, height)
# self.group.append(self.bodyshape)

@property
def label(self):
"""The text label of the button"""
Expand Down