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

Change default bg_col of ImageButton() #243

Closed
ApoorvaJ opened this issue Jun 14, 2015 · 3 comments
Closed

Change default bg_col of ImageButton() #243

ApoorvaJ opened this issue Jun 14, 2015 · 3 comments

Comments

@ApoorvaJ
Copy link

For ImageButton(), I think the default value of bg_col should be (0,0,0,0) instead of (0,0,0,1).

Most of the time, an ImageButton will be used to create buttons with icons on them. The default value makes it seem like a bug - that the code is ignoring the alpha.

Here's a screenshot of the default behavior of an Image() vs the default behavior of an ImageButton():

scr_26

@ApoorvaJ
Copy link
Author

Related issue:
When using ImageButton(), if frame_padding is set to 0, and the bg_col alpha is 0, then the button isn't drawn at all.

Makes sense when the image is fully opaque, but otherwise the button should be drawn behind the image, even if padding is 0.

ocornut added a commit that referenced this issue Jun 14, 2015
…o (0,0,0,0) tranparent + drawing frame even when no padding (#243)
@ocornut
Copy link
Owner

ocornut commented Jun 14, 2015

Agreeing for first change. Fixed both. Thanks!

@ocornut ocornut closed this as completed Jun 14, 2015
@ApoorvaJ
Copy link
Author

That was quick. Thanks! :)

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

No branches or pull requests

2 participants