mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add progress bar to gallery (#2399)
* Add progress bar to gallery * table fix
This commit is contained in:
@@ -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/)
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
## Unrelased
|
## Unreleased
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|||||||
@@ -158,6 +158,17 @@ Display placeholder content while you are designing a UI.
|
|||||||
```{.textual path="docs/examples/widgets/placeholder.py"}
|
```{.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
|
## RadioButton
|
||||||
|
|
||||||
A simple radio button.
|
A simple radio button.
|
||||||
|
|||||||
@@ -106,27 +106,22 @@ Refer to the [section below](#styling-the-progress-bar) for more information.
|
|||||||
|
|
||||||
## Reactive Attributes
|
## Reactive Attributes
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| 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. |
|
| `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. |
|
| `total` | `float | 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]
|
|
||||||
|
|
||||||
|
|
||||||
## Styling the Progress Bar
|
## Styling the Progress Bar
|
||||||
|
|
||||||
The progress bar is composed of three sub-widgets that can be styled independently:
|
The progress bar is composed of three sub-widgets that can be styled independently:
|
||||||
|
|
||||||
| Widget name | ID | Description |
|
| Widget name | ID | Description |
|
||||||
|-------------|----|-------------|
|
| ------------------ | ------------- | ---------------------------------------------------------------- |
|
||||||
| `Bar` | `#bar` | The bar that visually represents the progress made. |
|
| `Bar` | `#bar` | The bar that visually represents the progress made. |
|
||||||
| `PercentageStatus` | `#percentage` | [Label](./label.md) that shows the percentage of completion. |
|
| `PercentageStatus` | `#percentage` | [Label](./label.md) that shows the percentage of completion. |
|
||||||
| `ETAStatus` | `#eta` | [Label](./label.md) that shows the estimated time to completion. |
|
| `ETAStatus` | `#eta` | [Label](./label.md) that shows the estimated time to completion. |
|
||||||
|
|
||||||
### Bar Component Classes
|
### Bar Component Classes
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user