Skip to content

Commit c612be6

Browse files
committed
update docstrings
1 parent 9a169a6 commit c612be6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

adafruit_displayio_layout/layouts/grid_layout.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ class GridLayout(displayio.Group):
3636
3737
:param int x: x location the layout should be placed. Pixel coordinates.
3838
:param int y: y location the layout should be placed. Pixel coordinates.
39+
:param int width: Width of the layout in pixels.
40+
:param int height: Height of the layout in pixels.
41+
:param tuple grid_size: Size in cells as two ints in a tuple e.g. (2, 2)
42+
:param int cell_padding: Extra padding space inside each cell. In pixels.
43+
:param int max_size: (Optional) this will get passed through to the
44+
displayio.Group constructor. If omitted we default to
45+
grid_size width * grid_size height to make room for all (1, 1) sized cells.
3946
4047
"""
4148

@@ -95,10 +102,10 @@ def add_content(self, cell_content, grid_position, cell_size):
95102
96103
:param cell_content: the content to add to this cell e.g. label, button, etc...
97104
Group subclass that have width and height properties can be used.
98-
:param grid_position: where in the grid it should go. Tuple with
105+
:param tuple grid_position: where in the grid it should go. Tuple with
99106
x,y coordinates in grid cells. e.g. (1,0)
100-
:param cell_size: the size and shape that the new cell should
101-
occupy
107+
:param tuple cell_size: the size and shape that the new cell should
108+
occupy. Width and height in cells inside a tuple e.g. (1, 1)
102109
:return: None"""
103110
sub_view_obj = {
104111
"content": cell_content,

0 commit comments

Comments
 (0)