Skip to content

Add style variations to the progress bar widget #2920

@rodrigogiraoserrao

Description

@rodrigogiraoserrao

(This issue is reserved for the EuroPython 2023 sprint. If you are not participating in the sprint, please refrain from working on this issue. Thanks!)

Currently, the ProgressBar widget can have its colours changed, but the bar style is always the same.
This issue concerns itself with adding style variations to the actual bar.
Add the following styles:

  • default (the current one)
  • thick (use taller block characters)
  • and any other(s) you can think of!

To change the style of the progress bar, you will need to change the characters that are used inside textual.renderables.bar.py::Bar.__rich_console__.

The style for the progress bar can be selected via a keyword-only parameter variant upon instantiation, like ProgressBar(variant="thick"), akin to Button.
The progress bar variant should also be exposed as a reactive attribute variant.

Good luck and have fun!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions