Correcting examples

This commit is contained in:
Adafruit Adabot 2021-04-06 08:24:48 -04:00
parent 5d5c5eac33
commit ee42779ceb
4 changed files with 18 additions and 3 deletions

View file

@ -86,8 +86,8 @@ class ColorPicker(Widget, Control):
.. code-block:: python
my_colorpicker= ColorPicker(20, 30)
my_group = displayio.Group(max_size=10) # make a group that can hold 10 items
my_group.append(my_colorpicker) # Add my_slider to the group
my_group = displayio.Group(max_size=2) # make a group that can hold 2 items
my_group.append(my_colorpicker) # Add my_colorpicker to the group
#
# Append other display elements to the group

View file

@ -10,5 +10,8 @@ Color Picker Library
.. automodule:: adafruit_displayio_color_picker
:members:
.. automodule:: adafruit_displayio_color_picker.color_picker
:members:
.. automodule:: adafruit_displayio_color_picker.wheel_maker
:members:

View file

@ -6,3 +6,15 @@ Ensure your device works with this simple test.
.. literalinclude:: ../examples/displayio_color_picker_simpletest.py
:caption: examples/displayio_color_picker_simpletest.py
:linenos:
:lines: 8-
Wheel Maker Example
-------------------
Shows how to make color wheel bitmaps
.. literalinclude:: ../examples/displayio_color_picker_wheel_maker_simpletest.py
:caption: examples/displayio_color_picker_wheel_maker_simpletest.py
:linenos:
:lines: 8-

View file

@ -5,7 +5,7 @@ Table of Contents
=================
.. toctree::
:maxdepth: 4
:maxdepth: 3
:hidden:
self