Skip to content
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
5 changes: 1 addition & 4 deletions displayio_switchround.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,7 @@ def __init__(
"""""" # Blocks documentation from super-class

# initialize the Widget superclass (x, y, scale)
super().__init__(x=x, y=y, height=height, width=width, **kwargs, max_size=4)
# Define how many graphical elements will be in this group
# using "max_size=XX"
#
super().__init__(x=x, y=y, height=height, width=width, **kwargs)
# Group elements for SwitchRound:
# 0. switch_roundrect: The switch background
# 1. switch_circle: The switch button
Expand Down
2 changes: 1 addition & 1 deletion docs/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ group to the display as in this example:
.. code-block:: python

my_switch = Switch(20, 30) # create the switch at x=20, y=30
my_group = displayio.Group(max_size = 10) # make a group that can hold 10 items
my_group = displayio.Group() # make a group
my_group.append(my_switch) # Add my_switch to the group

#
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_switchround_multiple.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
# the switch anchored_position is 10 pixels from the display
# lower right corner

my_group = displayio.Group(max_size=8)
my_group = displayio.Group()
my_group.append(my_switch)
my_group.append(my_switch2)
my_group.append(my_switch3)
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_switchround_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
my_switch = Switch(20, 30)


my_group = displayio.Group(max_size=1)
my_group = displayio.Group()
my_group.append(my_switch)

# Add my_group to the display
Expand Down