mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-02 12:58:23 +00:00
docs: Fix broken links in our docs.
This commit is contained in:
parent
d2f08726a0
commit
78892cdf1f
8 changed files with 18 additions and 18 deletions
2
.github/workflows/nightly_snapshot.yaml
vendored
2
.github/workflows/nightly_snapshot.yaml
vendored
|
|
@ -310,7 +310,7 @@ jobs:
|
|||
cp -a ../target/doc/* snapshots/$target_branch/docs/rust/
|
||||
|
||||
# Fix up link to Slint language reference
|
||||
sed -i "s!https://slint-ui.com/releases/.*/doc/slint!../../slint!" snapshots/$target_branch/docs/rust/slint/index.html
|
||||
sed -i "s!https://slint-ui.com/releases/.*/doc/slint!../../slint!" snapshots/$target_branch/docs/rust/slint/*.html
|
||||
|
||||
mkdir -p snapshots/$target_branch/docs/tutorial/rust
|
||||
cp -a ../docs/tutorial/rust/book/html/* snapshots/$target_branch/docs/tutorial/rust
|
||||
|
|
|
|||
|
|
@ -114,9 +114,9 @@ myst_heading_anchors = 2
|
|||
|
||||
rst_epilog = """
|
||||
.. |ListView| replace:: :code:`ListView`
|
||||
.. _ListView: ../markdown/widgets.html#listview
|
||||
.. _ListView: ../slint/src/widgets.html#listview
|
||||
.. |Repetition| replace:: :code:`for` - :code:`in`
|
||||
.. _Repetition: ../markdown/langref.html#repetition
|
||||
.. _Repetition: ../slint/src/repetitions.html
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# Overview
|
||||
|
||||
The following sections explain how to integrate your `.slint` designs into your
|
||||
|
|
@ -53,14 +52,14 @@ that can hold different kinds of values, such as numbers, strings or even data
|
|||
models.
|
||||
|
||||
More complex user interfaces commonly consume data in the form of an abstract
|
||||
data model, that is used with [`for` - `in`](markdown/langref.md#repetition)
|
||||
repetitions or [`ListView`](markdown/widgets.md#listview) elements in the
|
||||
data model, that is used with [`for` - `in`](../slint/src/repetitions.html)
|
||||
repetitions or [`ListView`](../slint/src/widgets.html#listview) elements in the
|
||||
`.slint` language. All models in C++ with the interpreter API are sub-classes
|
||||
of the {cpp:class}`slint::Model` where the template parameter is
|
||||
{cpp:class}`slint::interpreter::Value`. To provide your own data model, you can
|
||||
subclass `slint::Model<slint::interpreter::Value>`.
|
||||
|
||||
It's possible to declare [singletons that are globally available](markdown/langref.md#global-singletons)
|
||||
It's possible to declare [singletons that are globally available](../slint/src/globals.html)
|
||||
in `.slint` files. You can access them from to your C++ code by exporting them
|
||||
and using the getter and setter functions on
|
||||
{cpp:class}`slint::interpreter::ComponentInstance` to change properties and
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ let main = new ui.Main();
|
|||
main.run();
|
||||
```
|
||||
|
||||
See [/examples/todo/node](/examples/todo/node) for a full example.
|
||||
See [/examples/todo/node](https://github.com/slint-ui/slint/tree/master/examples/todo/node) for a full example.
|
||||
|
||||
## API Overview
|
||||
|
||||
|
|
@ -149,4 +149,4 @@ component.model = model;
|
|||
model.push(4); // this works
|
||||
// does NOT work, getting the model does not return the right object
|
||||
// component.model.push(5);
|
||||
```
|
||||
```
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ fn main() {
|
|||
### The .slint code in external files is compiled with `build.rs`
|
||||
|
||||
When your design becomes bigger in terms of markup code, you may want move it to a dedicated*/
|
||||
#, "/doc/slint/modules.html).")]
|
||||
#, "/doc/slint/src/modules.html).")]
|
||||
/*!Use a [build script](https://doc.rust-lang.org/cargo/reference/build-scripts.html) to compile
|
||||
your main `.slint` file:
|
||||
|
||||
|
|
@ -206,8 +206,9 @@ struct MyStruct {
|
|||
|
||||
## Exported Global singletons
|
||||
|
||||
When you export a [global singleton](../../slint/globals.html) from the main file,
|
||||
it is also generated with the exported name. Like the main component, the generated struct have
|
||||
*/
|
||||
#, "/doc/slint/src/globals.html) from the main file,.")]
|
||||
/* it is also generated with the exported name. Like the main component, the generated struct have
|
||||
inherent method to access the properties and callback:
|
||||
|
||||
For each property
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ All properties in Slint have a type. Slint knows these basic types:
|
|||
| `bool` | boolean whose value can be either `true` or `false`. |
|
||||
| `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`. |
|
||||
| `brush` | A brush is a special type that can be either initialized from a color or a gradient specification. See the [Colors and Brushes Section](brushes.md#colors-and-brushes) 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 and Brushes Section](#colors-and-brushes) for more information. |
|
||||
| `physical-length` | This is an amount of physical pixels. To convert from an integer to a length unit, one can simply multiply by `1px`. Or to convert from a length to a float, one can divide by `1phx`. |
|
||||
| `length` | The type used for `x`, `y`, `width` and `height` coordinates. Corresponds to a literal like `1px`, `1pt`, `1in`, `1mm`, or `1cm`. It can be converted to and from length provided the binding is run in a context where there is an access to the device pixel ratio. |
|
||||
| `duration` | Type for the duration of animations. A suffix like `ms` (millisecond) or `s` (second) is used to indicate the precision. |
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="author" content="SixtyFPS GmbH" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="icon" type="image/png" href="./favicon.png" />
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||
<!-- fonts-->
|
||||
|
||||
<style>
|
||||
|
|
@ -675,8 +675,8 @@
|
|||
<div>
|
||||
<h6>Company</h6>
|
||||
<a href="https://github.com/slint-ui/slint">GitHub</a>
|
||||
<a href="./imprint.html">Imprint</a>
|
||||
<a href="./imprint.html#privacy">Privacy Policy</a>
|
||||
<a href="/imprint.html">Imprint</a>
|
||||
<a href="/imprint.html#privacy">Privacy Policy</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ pub use crate::SharedString;
|
|||
/// Palette::get(&app).set_foreground_color(slint::Color::from_rgb_u8(255, 255, 255));
|
||||
/// ```
|
||||
///
|
||||
/// See also the [language reference for global singletons](docs/langref/index.html#global-singletons) for more information.
|
||||
#[doc = concat!("See also the [language reference for global singletons](https://slint-ui.com/releases/", env!("CARGO_PKG_VERSION"), "/doc/slint/src/globals.html) for more information.")]
|
||||
///
|
||||
/// **Note:** Only globals that are exported or re-exported from the main .slint file will
|
||||
/// be exposed in the API
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue