Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transparency in icon image. Background color for label. #68

Merged
merged 2 commits into from
Jan 19, 2022

Conversation

FoamyGuy
Copy link
Contributor

@FoamyGuy FoamyGuy commented Jan 3, 2022

This adds two new features to the IconWidget both exposed as arguments to the constructor

  • label_background which can be set to a hex color i.e. 0x888888 and will get set as the color in the background of the icon label.
  • transparency_index which can be set to an integer index within the palette of the icon bmp image. If set this will call make_transparent() on the given index to make it not get drawn on the display.

Both of these new features are used in the PyPortal Busy Simulator app that I am working on a guide for.

@FoamyGuy
Copy link
Contributor Author

FoamyGuy commented Jan 3, 2022

Initially this failed CI due to sphinx not being able to find BDF class. In the latest commit I added bitmap_font library to requirements.txt in order to resolve that and make it passing CI.

Copy link

@askpatrickw askpatrickw left a comment

Choose a reason for hiding this comment

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

I gave this a quick review. Looks good.
I do see the docstring nicely covers all the new parameters as well.

Not tested.

@kmatch98 kmatch98 merged commit 1d1d951 into adafruit:main Jan 19, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jan 28, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_Nunchuk to 1.1.0 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Nunchuk#28 from kattni/pypi
  > Updated docs link, updated python docs link, updated setup.py
  > First part of patch
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_AzureIoT to 2.5.0 from 2.4.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_AzureIoT#37 from askpatrickw/add-ssl-context
  > Update Dependencies DOCSTRING
  > Update samples and docs
  > typo in the README
  > make SAS Key more specific
  > Fix miniMQTT compatibility and native_networking examples
  > Updated docs link, updated python docs link, updated setup.py
  > First part of patch
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_Layout to 1.17.0 from 1.16.0:
  > Updated docs link, updated python docs link, updated setup.py
  > First part of patch
  > Merge pull request adafruit/Adafruit_CircuitPython_DisplayIO_Layout#68 from FoamyGuy/transparency_and_label_bg

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_Nunchuk, Adafruit_CircuitPython_AzureIoT, Adafruit_CircuitPython_DisplayIO_Layout
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.

None yet

3 participants