Gradient-Widgets icon indicating copy to clipboard operation
Gradient-Widgets copied to clipboard

No way to set background of GradientProgressIndicator

Open muhammadidrees opened this issue 4 years ago โ€ข 13 comments

muhammadidrees avatar Apr 09 '20 13:04 muhammadidrees

Facing the same issue, It'd be useful if you add this feature.

saigkl avatar Apr 14 '20 20:04 saigkl

Hello ๐Ÿ‘‹๐Ÿผ, can you please explain what do you mean by a background to the GradientProgressIndicator? the item must have colors depending on its gradient.

bluemix avatar Apr 15 '20 05:04 bluemix

Hey,

The default widget LinearProgressIndicator has a property called backgroundColor, which will help us to change the track colour.

What happens now is the begin gradient colour is automatically applied as the track colour.

saigkl avatar Apr 15 '20 05:04 saigkl

because it it should represent the colors of the gradient assigned to to, otherwise, where will the gradient colors go to the progress?

What happens now is the begin gradient colour is automatically applied as the track colour.

in this case, you can change the begin gradient color to change the background of the progress.

bluemix avatar Apr 15 '20 08:04 bluemix

All this does is uses two colours for the progress bar but what Iโ€™m asking for is a separate background colour and the gradient only for the progress.

This is wanted: 3C261122-942C-4841-8713-012FA7B18924

This is what happens right now: D54F5804-BE8B-44B3-ACF0-3E25768A1C22

Sorry for the image quality hope it sets the point across.

P.S. I did a work around in your code and achieved what I wanted can share the code with you if youโ€™re interested ๐Ÿ™ƒ

muhammadidrees avatar Apr 16 '20 14:04 muhammadidrees

This is wanted: 3C261122-942C-4841-8713-012FA7B18924

LinearProgressIndicator should have a background color because it has the progress color and the background color. GradientProgressIndicator here has a background color, but as you can see it is outside of the gradient colors. Second, there need to be color matching between the gradient colors and the background color in order to have a good UI.

P.S. I did a work around in your code and achieved what I wanted can share the code with you if youโ€™re interested ๐Ÿ™ƒ

I'll stick with my options. thanks ๐Ÿ˜€

bluemix avatar Apr 16 '20 16:04 bluemix

But still, I'll say that a package should be flexible enough to be customized as per all use cases and having a background color behind the progress bar (even outside the gradient) is a common use case.

I'll stick with my options. thanks ๐Ÿ˜€

No problem. :)

muhammadidrees avatar Apr 17 '20 07:04 muhammadidrees

if as you would suggest, the library should be flexible, can you please make a pull request for this feature so that I can test it? @muhammadidrees

bluemix avatar Apr 18 '20 18:04 bluemix

Sure just give me some time I'll get to it as soon as I am free. @bluemix

muhammadidrees avatar Apr 22 '20 12:04 muhammadidrees

@muhammadidrees Ok, take your time...

bluemix avatar Apr 22 '20 14:04 bluemix

Sorry to barge into your little conversation. I've also needed this feature and created a PR. @bluemix let me know what you think. cc: @muhammadidrees https://github.com/bluemix/Gradient-Widgets/pull/19

arielbh avatar Jul 09 '20 18:07 arielbh

dear @arielbh, #19 has conflicts

bluemix avatar Apr 02 '21 18:04 bluemix

and also having a more than 2 color gradient would be nice! but is this dead? in the meanwhile i will try the fork of arielbh....

nohkumado avatar Jun 09 '22 16:06 nohkumado