Commit graph

467 commits

Author SHA1 Message Date
ogoffart
6395cdfc09 Bump version number to 0.2.3 2022-05-04 12:32:58 +00:00
Olivier Goffart
ed7eb6f540 Revert "Update URL in docs for release"
This reverts commit 79a1bd5d6e.

Release is done 🎉
2022-05-04 13:53:31 +02:00
Olivier Goffart
79a1bd5d6e Update URL in docs for release 2022-05-04 12:02:36 +02:00
Olivier Goffart
69a2d45203 Update version number in docs and readme 2022-05-04 12:00:57 +02:00
Tobias Hunger
894ee5aa91
Do not build node by default (#1210)
Having to make sure the right version of npm is installed is a hassle
for people that just want to try out slint for the first time. The
proposed way to disable node support enables basically everything else,
which opens another can of worms when Windows tries to build MCU
support.

So do not build Node.JS as part of the default build anymore, but
document how to build it.

The CI should build with `--workspace` already, so there should be no
need to change the CI build.
2022-05-02 13:30:19 +02:00
Olivier Goffart
f75a0d4e0f
Recipes: Slider and Tabs 2022-04-20 18:03:40 +02:00
Olivier Goffart
dee7d9c556 Documentation: add a edit link to .slint snippet that open the code editor 2022-04-20 16:49:05 +02:00
Olivier Goffart
ca5bfd3426 Doc recipes: add custom widgets 2022-04-19 17:11:20 +02:00
Olivier Goffart
452bc2a696 Update MSRV to rust 1.59 in the CI and documentation
This is only required for dependencies of slint-build and xtask.
So this is not enforced yet and will still work with 1.56 with
for C++ or when not using slint-build.
2022-04-14 19:18:05 +02:00
Simon Hausmann
5a90d0dfa5 Rework the global singleton section in the language reference
Move the explanation of using two-way bindings to expose globals further
down.

Before that, provide inline examples with Rust and C++ how to access the
globals directly.
2022-04-13 17:01:03 +02:00
Olivier Goffart
dd3d738774 C++ test: use the libslint_cpp.so from the deps folder
For some reason, The cargo test for the cpp driver test puts the
libslint_cpp.so library in the `deps` foilder, in addition to the
cdynlib which is generated in the normal target folder. So we end
up with two .so.

We need to have the cpp lib as a dependency because its metadata give us the
metadata on where to find the headers.
Ideally it should be an artifact dependency but this is not yet existing

Since cargo sets the LD_LIBRARY_PATH or the PATH env variable when
running the test, running the runtime built binaries work by taking
the library that is in the deps folder.
2022-04-13 10:37:37 +02:00
Olivier Goffart
54a6cb22ee Allow .darker and .brighter on Brush 2022-04-12 13:01:53 +02:00
Olivier Goffart
40c98d6d05 Update cbindgen and enable MouseCursor::move
cbindgen 0.21 was released which contains https://github.com/eqrion/cbindgen/pull/724
which allow to use raw identifier in enums shared with C++.
So now we can have `MouseCursor.move` in slint  despite it being a rust keyword

Note that the strum macro also have trouble with the raw identifier, so we
take that in account in the conversion functions in the interpreter
2022-04-05 06:39:50 +02:00
Olivier Goffart
c24a51aaba Apply suggestions from code review
grammar and wording fixes

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2022-04-05 06:39:21 +02:00
Olivier Goffart
7979d54c85 Recipes: Add some text to fill it 2022-04-05 06:39:21 +02:00
Simon Hausmann
72cf11b855 Adapt to correct no-preview code fence syntax 2022-04-04 10:01:26 +02:00
Simon Hausmann
87d66d0e53 Fix the compilation of the global callback example recipe 2022-04-04 10:01:26 +02:00
Simon Hausmann
f1e7f876f9 Make the showing/hiding of language snippets explicit in the markup
Use a data attribute instead of relying on the structure of rustdoc and myst-parser/sphinx.
2022-04-04 10:01:26 +02:00
Simon Hausmann
2e9fc34af3 Don't run the global callback example as preview 2022-04-04 10:01:26 +02:00
Simon Hausmann
809b29a422 Added example of invoking a global callback 2022-04-04 10:01:26 +02:00
Simon Hausmann
1eaee7809d Show/hide the language specific example blocks in the recipes 2022-04-04 10:01:26 +02:00
Simon Hausmann
f88b9f143e Fix doctest
Make the native Rust example compile
2022-04-04 10:01:26 +02:00
Simon Hausmann
4c88b2b19b Start a page with examples and recipes
This is the beginning of a page to collect common things users need to
do, in a format that they can copy & paste into their application code.

There's a lot more that could be done though.
2022-04-04 10:01:26 +02:00
Simon Hausmann
f1088611fb Rename slint,no_run into slint,no-preview for the code fence tags 2022-04-04 09:58:09 +02:00
Simon Hausmann
4c103b7a72 Fix the previews in the language reference
After commit 079a8a75d6 some previews
started having default 1024x768 winit sizes, which breaks.

Instead, assign preferred sizes and Window elements to all enabled
previews, and disable some where it doesn't make sense.
2022-04-04 09:58:09 +02:00
Simon Hausmann
ed5b76e7fc Improve syntax highlighting in the language reference
Highlight all Slint code and don't do the preview on snippets where it
doesn't make sense.

Some snippets, such as the bare statement or expression snippets, are
now highlighted, but they are continued to be excluded from the doctest.
2022-04-04 09:58:09 +02:00
Olivier Goffart
5a3f2551ad Docs preview: keep the browser default canvas size by default
Setting it to 0 will then use the winit default that are way too big

And in this case, the preferred size is still respected
2022-04-01 16:18:59 +02:00
Simon Hausmann
0b9141c3d3 Apply suggestions from code review
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
2022-03-21 20:22:43 +01:00
Simon Hausmann
bef31d3169 Rename the layer boolean property to cache-rendering-hit 2022-03-21 20:22:43 +01:00
Simon Hausmann
535e134223 Add a Layer element that's created when using a layer boolean property
For now no backend implements this optimization hint.
2022-03-21 20:22:43 +01:00
Simon Hausmann
079a8a75d6 Fix sizes of some of the preview canvas elements in the docs
Don't fix the canvas to 100/100 physical pixels, as not all examples fit into that. Instead
let the GL backend resize according to constraints,
and add some missing sizes to some examples.
2022-03-21 16:53:30 +01:00
Simon Hausmann
3f53ce2f92 Re-organize the last page of the tutorial
Based on the reddit feedback, add links to the API docs and restructure
the list a little.
2022-03-17 21:32:33 +01:00
Simon Hausmann
b34f733716 Point C++ users to the new release/0.2 branch
That way version upgrades to new patch release become easier.
2022-03-10 11:08:58 +01:00
ogoffart
7b50791db4 Bump version number to 0.2.2 2022-03-10 08:48:33 +00:00
Olivier Goffart
1aaa48c6a6 Revert "Update URL for the release"
This reverts commit c04c0946f3.

Release was done
2022-03-10 09:47:30 +01:00
Olivier Goffart
c04c0946f3 Update URL for the release 2022-03-10 08:48:42 +01:00
Olivier Goffart
3b2b1c92a4 Update version number in docs and readmes
```
sed --follow-symlinks -i 's/^\(slint.*\) = ".*"/\1 = "0.2.1"/' **/*.rs **/*.md
sed --follow-symlinks -i 's/GIT_TAG v.*$/GIT_TAG v0.2.1/' **/*.md
```
2022-03-10 08:46:16 +01:00
Lukas Jung
2fbe2e12b3 tutorial: remove minor version from dependencies
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
2022-03-09 14:10:45 +01:00
Lukas Jung
7e46829deb tutorial: improve wording and links in extension recommendations
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
2022-03-09 14:10:45 +01:00
Lukas Jung
cd52beb85e tutorial: clone() the tiles_model step 6 already like the explanation says 2022-03-09 14:10:45 +01:00
Lukas Jung
7aac74af6e bump version to 0.2.1 in tutorial 2022-03-09 14:10:45 +01:00
Lukas Jung
8c23291a08 mention recommended editor extensions in tutorial 2022-03-09 14:10:45 +01:00
Simon Hausmann
4d31ec5874 Fix instructions for unpacking the icons on Windows 2022-03-09 11:26:26 +01:00
Simon Hausmann
ea0e02f468 Fix tutorial C++ instructions for starting the memory game on Windows 2022-03-09 11:26:26 +01:00
Simon Hausmann
f21040614c Fix for combo not being visible in the docs
Make sure that the window is height enough to have space for it.
2022-03-09 10:26:01 +01:00
Olivier Goffart
c9319add6a Export the input-type from the LineEdit 2022-03-02 21:55:49 +01:00
Jared Moulton
b884a4ca19 Fix CI issues, remove references to replace-char, add a test, fix creation of string 2022-03-02 15:47:32 +01:00
Jared Moulton
fdbc8056b3 Add an option to draw *'s instead of characters for password fields 2022-03-02 15:47:32 +01:00
Olivier Goffart
0ba3a14f8a Simplify a bit the test dependencies
So compiling the tests can be a bit faster
2022-02-15 10:47:58 +01:00
Benedikt Werner
91a8cab42e Minor documentation fixes 2022-02-11 13:45:01 +01:00