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

RFC: Progress bar widget #33

Closed
viciious opened this issue Jun 28, 2019 · 2 comments
Closed

RFC: Progress bar widget #33

viciious opened this issue Jun 28, 2019 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@viciious
Copy link
Contributor

libRocket/libRocket#32

This looks potentially useful and viable for promotion to a stock widget but needs proper merging and a sample program.

@mikke89
Copy link
Owner

mikke89 commented Jun 28, 2019

Looks useful to me. However I would implement it a bit differently. It is a bit inflexible and awkward to specify the images in attributes. Instead, I suggest doing it more like this:

  • Generate an extra underlying (non-dom) element, kind of like we do in scrollbars, which represents the "filled" value.
  • Now, we can easily use decorators as normal, we can have one for the background, and a separate one for the fill.
  • Clip the fill element such that its width is proportional to its value. We could use an attribute to tell whether this should happen up/down/left/right.

This would be more flexible, allowing us to use any decorator including sprites to style both the background and fill, or just background-color if we like.

Also, it should be part of the controls library in my opinion.

As for the sample, I think we should create a demo sample that demonstrates all the controls (and possibly other features in general), which includes this.

@mikke89 mikke89 added the enhancement New feature or request label Jun 28, 2019
@mikke89 mikke89 added this to the 3.1 milestone Nov 24, 2019
@mikke89 mikke89 mentioned this issue Dec 1, 2019
@mikke89
Copy link
Owner

mikke89 commented Dec 10, 2019

Implemented in 634543b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants