adafruit / Adafruit_CircuitPython_Display_Button

Press it!
MIT License
4 stars 17 forks source link

Assigning black fill + outline prevents body style formatting #10

Closed jpecor closed 5 years ago

jpecor commented 5 years ago

The if outline_color or fill color: check fails when both _fillcolor and _outlinecolor are set to 0x000000. As a result, the body style formatting is never applied, and the button is not added to the display group.

ladyada commented 5 years ago

@jpecor see if you can fix it, try changing the if to if (outline_color is not None) or (fill_color is not None) instead!

jpecor commented 5 years ago

Yes, that will work.

Is it the intent to allow "transparent" buttons by setting the outline/fill to None, then? It's a nifty feature that I didn't really even realize was possible until I was doing some testing with this issue.

I can submit a PR with your recommended fix. That works.

ladyada commented 5 years ago

yes thats right, it allows transparancy, a PR would be great :)

jpecor commented 5 years ago

Ok, great. Thanks!

jpecor commented 5 years ago

Thanks ladyada!

makermelissa commented 5 years ago

Fixed via #11