mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Mention the bool
type in the docs
This commit is contained in:
parent
0eb223b2ca
commit
28932a32a5
3 changed files with 3 additions and 0 deletions
|
@ -7,6 +7,7 @@ The follow table summarizes the entire mapping:
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `int` | `int` | |
|
| `int` | `int` | |
|
||||||
| `float` | `float` | |
|
| `float` | `float` | |
|
||||||
|
| `bool` | `bool` | |
|
||||||
| `string` | [`sixtyfps::SharedString`](../api/structsixtyfps_1_1_shared_string.html) | A reference-counted string type that uses UTF-8 encoding and can be easily converted to a std::string_view or a const char *. |
|
| `string` | [`sixtyfps::SharedString`](../api/structsixtyfps_1_1_shared_string.html) | A reference-counted string type that uses UTF-8 encoding and can be easily converted to a std::string_view or a const char *. |
|
||||||
| `color` | [`sixtyfps::Color`](../api/classsixtyfps_1_1_color.html) | |
|
| `color` | [`sixtyfps::Color`](../api/classsixtyfps_1_1_color.html) | |
|
||||||
| `brush` | [`sixtyfps::Brush`](../api/classsixtyfps_1_1_brush.html) | |
|
| `brush` | [`sixtyfps::Brush`](../api/classsixtyfps_1_1_brush.html) | |
|
||||||
|
|
|
@ -150,6 +150,7 @@ The follow table summarizes the entire mapping:
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `int` | `i32` | |
|
| `int` | `i32` | |
|
||||||
| `float` | `f32` | |
|
| `float` | `f32` | |
|
||||||
|
| `bool` | `bool` | |
|
||||||
| `string` | [`SharedString`] | A reference-counted string type that can be easily converted to a str reference. |
|
| `string` | [`SharedString`] | A reference-counted string type that can be easily converted to a str reference. |
|
||||||
| `color` | [`Color`] | |
|
| `color` | [`Color`] | |
|
||||||
| `brush` | [`Brush`] | |
|
| `brush` | [`Brush`] | |
|
||||||
|
|
|
@ -192,6 +192,7 @@ All properties in elements have a type. The following types are supported:
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `int` | Signed integral number. |
|
| `int` | Signed integral number. |
|
||||||
| `float` | Signed, 32-bit floating point number. Numbers with a `%` suffix are automatically divided by 100, so for example `30%` is the same as `0.30`. |
|
| `float` | Signed, 32-bit floating point number. Numbers with a `%` suffix are automatically divided by 100, so for example `30%` is the same as `0.30`. |
|
||||||
|
| `bool` | boolean whose value can be either `true` or `false`. |
|
||||||
| `string` | UTF-8 encoded, reference counted string. |
|
| `string` | UTF-8 encoded, reference counted string. |
|
||||||
| `color` | RGB color with an alpha channel, with 8 bit precision for each channel. CSS color names as well as the hexadecimal color encodings are supported, such as `#RRGGBBAA` or `#RGB`. |
|
| `color` | RGB color with an alpha channel, with 8 bit precision for each channel. CSS color names as well as the hexadecimal color encodings are supported, such as `#RRGGBBAA` or `#RGB`. |
|
||||||
| `brush` | A brush is a special type that can be either initialized from a color or a gradient specification. See the [Colors Section](#colors) for more information. |
|
| `brush` | A brush is a special type that can be either initialized from a color or a gradient specification. See the [Colors Section](#colors) for more information. |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue