Add progress bar to gallery (#2399)

* Add progress bar to gallery

* table fix
This commit is contained in:
Will McGugan
2023-04-27 11:37:53 +01:00
committed by GitHub
parent 01df8b0726
commit 55e198767f
3 changed files with 22 additions and 16 deletions

View File

@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## Unrelased
## Unreleased
### Added

View File

@@ -158,6 +158,17 @@ Display placeholder content while you are designing a UI.
```{.textual path="docs/examples/widgets/placeholder.py"}
```
## ProgressBar
A configurable progress bar with ETA and percentage complete.
[ProgressBar reference](./widgets/progress_bar.md){ .md-button .md-button--primary }
```{.textual path="docs/examples/widgets/progress_bar.py" press="tab,5,0,tab,enter"}
```
## RadioButton
A simple radio button.

View File

@@ -107,15 +107,10 @@ Refer to the [section below](#styling-the-progress-bar) for more information.
## Reactive Attributes
| Name | Type | Default | Description |
|------|------|---------|-------------|
| `percentage` | `float | None` | `None` | The read-only percentage of progress that has been made. This is `None` if the `total` hasn't been set. |
| ------------ | ------- | ------- | ------------------------------------------------------------------------------------------------------- |
| `percentage` | `float | None` | The read-only percentage of progress that has been made. This is `None` if the `total` hasn't been set. |
| `progress` | `float` | `0` | The number of steps of progress already made. |
| `total` | `float | None` | `None` | The total number of steps that we are keeping track of. |
## Messages
- [ProgressBar.Completed][textual.widgets.ProgressBar.Completed]
- [ProgressBar.Started][textual.widgets.ProgressBar.Started]
| `total` | `float | None` | The total number of steps that we are keeping track of. |
## Styling the Progress Bar
@@ -123,7 +118,7 @@ Refer to the [section below](#styling-the-progress-bar) for more information.
The progress bar is composed of three sub-widgets that can be styled independently:
| Widget name | ID | Description |
|-------------|----|-------------|
| ------------------ | ------------- | ---------------------------------------------------------------- |
| `Bar` | `#bar` | The bar that visually represents the progress made. |
| `PercentageStatus` | `#percentage` | [Label](./label.md) that shows the percentage of completion. |
| `ETAStatus` | `#eta` | [Label](./label.md) that shows the estimated time to completion. |