-
Notifications
You must be signed in to change notification settings - Fork 9
Add ability to change Progress Bar background color. #20
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
Comments
you can change the colors used with parameters in the constructor. See the magtag example script here for an example of using custom colors:
The full init is: progress_bar = ProgressBar(
x, y, BAR_WIDTH, BAR_HEIGHT, 1.0, bar_color=0x666666, outline_color=0xFFFFFF
) |
When I say background color, I am talking about the rightmost portion when the progress is less than 100%. |
Ah I see what you mean, I do think it would be good to allow it to be set to any color instead of hard-coded to Are you interested in making a PR with this change? We can help you along the way if you are new to git or github. If not I can try to work on this enhancement later this week or next. |
Yes, I would like to do the pull request, but would need some help walking me through how to so. |
Awesome! Thank you for being willing to contribute. For now I will link to you some great guides, and ask a few more questions so I can try to get a good understanding of your current level of experience with it so I know how to best help. Taking a quick step back... Do you have an idea of what needs to change within the library code in order to support custom backgrounds? or would you like a point in the right direction on that front as well? These guides cover git / github and the other tools that are needed when working on Circuit Python related libraries:
|
I have made the update to my local copy and seems to be working correctly. I will read through those guides over the next few days. |
Other things came up, I am not going to be able to do my own pull request on this for a while. I can provide my version with the update I did locally. |
No worries. That would be great if you can provide your version. I'll work on getting this implemented. |
What would be the best way to do so? Copy here or attach? |
whatever is easiest for you honestly. you can paste here if you put triple back ticks around it (shift tilda key) it will get formatted:
or you can try attaching the file. Maybe make it a txt file first, there may be restriction on type. |
Lets see how this goes. |
Perfect! Thank You for that! I'll work on getting a PR in with this. |
Much thanks. |
This is one of the changes I've made as part of issue #21. While I intended to address it as its own separate issue, I got into it as I was refactoring and "in the plumbing". |
This has been added as of v2.0 of the ProgressBar project when using either the |
I recommend we close this issue as resolved, @CircuitPythonLibrarians. |
Closed by #21 |
Currently the background color is hardcoded in the library.
The text was updated successfully, but these errors were encountered: