Added Spinner widget (#3871)

This commit is contained in:
Florian Blasius 2023-11-07 15:04:24 +01:00 committed by GitHub
parent 3c9dca6daf
commit 110689bad1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 217 additions and 5 deletions

View file

@ -24,6 +24,7 @@ Widgets
scrollview.md
slider.md
spinbox.md
spinner.md
standardbutton.md
standardlistview.md
standardtableview.md

View file

@ -0,0 +1,24 @@
<!-- Copyright © SixtyFPS GmbH <info@slint.dev> ; SPDX-License-Identifier: MIT -->
## `Spinner`
The `Spinner` informs the user about the status of an on-going operation, such as loading data from the network. It provides the same properties as
[`ProgressIndicator`](./progressindicator.md) but differs in shape.
### Properties
- **`indeterminate`**: (_in_ _bool_): Set to true if the progress of the operation cannot be determined by value (default value: `false`).
- **`progress`** (_in_ _float_): Percentage of completion, as value between 0 and 1. Values less than 0 or greater than 1 are capped.
### Example
```slint
import { Spinner } from "std-widgets.slint";
export component Example inherits Window {
width: 200px;
height: 25px;
Spinner {
progress: 50%;
}
}
```