Commit graph

120 commits

Author SHA1 Message Date
Olivier Goffart
692171bf0c Change the 60 blocks to slint blocs in documentation comments 2022-02-02 10:51:42 +01:00
Olivier Goffart
03534039d6 Replace more .60 by .slint
Mainly an automated change with
    git grep -O"sed -i 's/\.60/.slint/g'" -w "\.60"

and some manual checks
2022-02-02 10:12:31 +01:00
Olivier Goffart
d706d63ce1 Replace references to the .60 files that are now renamed with .slint 2022-02-02 10:12:31 +01:00
Olivier Goffart
0308f86cd4 Rename sixtyfps_widgets.60 to std-widgets.slint 2022-02-01 18:58:54 +01:00
Simon Hausmann
fa1ac9884d Verify the existence of imported custom fonts
... and produce diagnostics.

That way in later phases we don't need to check again.

As an unfortunately side-effect, we need to skip one of the examples in
the language reference from the doc test, as the compilation fails
because the font does not exist.
2022-01-19 16:24:22 +01:00
James Blacklock
7ad1ba209d Add support for array index expressions
This is a squash of the changes in
https://github.com/sixtyfpsui/sixtyfps/pull/605
2022-01-14 13:38:25 +01:00
Tobias Hunger
32cd9ccab2 Document delay property on PropertyAnimation 2022-01-11 20:58:26 +01:00
Simon Hausmann
eee5062e75 Small grammar fixes in the docs 2022-01-10 18:37:50 +01:00
Jared Moulton
c5c139fbc9
Feat: Add math funcs Log10, Log2, Log and Exp (#813)
Implement Math.log and Math.pow
2022-01-07 12:07:58 +01:00
Olivier Goffart
5891d006b1 Add a paragraph about when property are re-evaluated
As discussed in #769
2022-01-03 11:40:03 +01:00
Olivier Goffart
963c44fd78 Put the global functions also in the Math namespace
So they can be accessible even if there is a property of the same name
2021-12-08 16:35:11 +01:00
Olivier Goffart
0436ce2399 Allow to access color names form the Colors namespace 2021-12-08 16:35:11 +01:00
Olivier Goffart
efd0aee6ec
Docs: remove the wording about the limitation that length does not track the model
Was solved in #599
2021-10-20 15:29:15 +02:00
Olivier Goffart
6c677d13ac Document the new lenght properties on arrays
CC #580
2021-10-18 10:29:50 +02:00
Simon Hausmann
e3ce136106 Provide a modern introduction to the language reference 2021-10-13 10:38:05 +02:00
Simon Hausmann
db60a5c4e1 Provide a slightly simpler language reference intro sentence 2021-10-12 10:30:46 +02:00
Olivier Goffart
f0f264a94a Document the ternary operator
CC: https://github.com/sixtyfpsui/sixtyfps/discussions/562
2021-10-11 10:49:45 +02:00
Olivier Goffart
f2774a41a5 Document logical and comparison operators 2021-09-24 09:43:23 +02:00
Olivier Goffart
28932a32a5 Mention the bool type in the docs 2021-09-24 09:26:00 +02:00
Olivier Goffart
8d15bc1427 Parser: make the parentheses around if element optional
closes #466
2021-09-07 10:57:08 +02:00
Simon Hausmann
26a63fcf22 Change example docs of global exports to use a re-export
That's the more typical use-case to also deal with name spaces, where
this is done at import time.

The modified test case tries to ensure that this also works.
2021-08-27 13:38:57 +02:00
Simon Hausmann
85259b21b6 Provide an example of global exporting in the language reference 2021-08-27 13:36:48 +02:00
Olivier Goffart
b07d52cd23 Support aliases to callbacks in globals 2021-08-24 12:36:16 +02:00
Olivier Goffart
3b6b4442dd Apply suggestions from code review
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2021-08-10 22:21:01 +02:00
Olivier Goffart
8b2d1f1d8f Docs: replace underscores by dashes 2021-08-10 22:21:01 +02:00
Tobias Hunger
b347642f28 Fix typos, grammar and formatting issues in the docs 2021-08-08 11:06:58 +02:00
Simon Hausmann
317111ef2b Small drive-by typo fixes 2021-07-01 10:31:36 +02:00
Olivier Goffart
b5f2bbe8bb Mark code fragment as ignored in langref.md
With the nightly rust compiler, we include the langref.md in the
rust documentation, but we don't want these snippets to be understood
as rust code and tested
2021-06-30 09:23:57 +02:00
Tobias Hunger
e01bd87df8 Janitor: Fix warnings about markdown files
These might change the layout of the rendered markdown files. This will
also fix some typos along the way:-)
2021-06-28 08:32:25 +02:00
Tobias Hunger
13d7f5e7bd Janitor: Fix typos in comments and user-facing strings
Also adapt tests for error messages containing the fixed strings.

No behavior change is intended!
2021-06-28 08:32:25 +02:00
Olivier Goffart
99c140ae08 Allow accessing the width and height of the image in .60
Closes #208
2021-06-21 11:22:50 +02:00
Olivier Goffart
42c25248a8 Allow to give a name to for and if 2021-06-18 16:40:40 +02:00
Olivier Goffart
2483425d57 Add abs() 2021-06-11 14:17:47 +02:00
Olivier Goffart
ce34ff87d0 Finish support for callback aliases
cc #111
2021-06-07 20:40:36 +02:00
Olivier Goffart
6a4cd0087f Apply suggestions from code review
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2021-06-07 10:48:09 +02:00
Olivier Goffart
715d38903f Allow to omit the type of aliases 2021-06-07 10:48:09 +02:00
Olivier Goffart
91ed04a72c Make length (still the default for all property) be the logical length
And a new `physical_length` is now the physical_length unit

Note: this does not change the runtime part yet
2021-04-21 17:15:19 +02:00
Olivier Goffart
ce6aa06964 Fix the doc test
A newline is required so it can match the end of the snippet
2021-04-14 18:52:36 +02:00
Simon Hausmann
7a681001cd Provide a short example for the custom font import 2021-04-14 18:28:24 +02:00
Simon Hausmann
595d1dbac0 Add documentation to the language reference about font handling
... and specifically custom fonts
2021-04-14 11:22:19 +02:00
Olivier Goffart
e67deebc76 Make rgb() and rgba() a macro that can take 3 or 4 arguments
and that accept both percent or integer

Closes #139
2021-04-12 15:19:15 +02:00
Seo Sanghyeon
0a76f40093 Add rgb function 2021-04-12 13:24:46 +02:00
Olivier Goffart
87ad4fe59e Rename Object to Struct in the language reference 2021-03-16 12:32:24 +01:00
Olivier Goffart
c840b046ae Rename the "resource" type to "image" 2021-03-10 17:24:31 +01:00
Simon Hausmann
391d0152f0 Add Color::brighter/darker functions
These are exposed in .60 as well as in Rust and C++ and implemented by
converting to HSV color space and adjusting the brightness (value).
2021-02-24 10:49:27 +01:00
Olivier Goffart
5727a4cf02 implement square root 2021-02-20 08:53:08 +01:00
Simon Hausmann
f64f3f6804 Prospective doc and link warning fix
Try to use the correct anchor
2021-02-10 11:42:21 +01:00
Olivier Goffart
431ce88326 sin/cos/tan and asin/acos/atan 2021-02-08 12:23:31 +01:00
Olivier Goffart
49c7300907 Support for if else in statements 2021-02-05 13:53:37 +01:00
Simon Hausmann
7712326a32 Try to fix the gradient rendering preview 2021-02-03 18:03:46 +01:00