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
Simon Hausmann
8642d5cd3e
Fix typo in docs example
2021-02-03 17:46:27 +01:00
Simon Hausmann
26829b539b
First draft of gradient docs
2021-02-03 17:12:48 +01:00
Simon Hausmann
7982325da4
Change Rectangle::background's type to be a brush
...
This also introduces the brush type in the compiler and generators. At the
moment only conversion from Color is implemented.
2021-02-03 12:49:44 +01:00
Simon Hausmann
c771bcff45
Print a warning when trying to animate deprecated properties
2021-02-02 22:58:54 +01:00
Simon Hausmann
246398fcb3
Issue a warning when accessing deprecated properties through member lookups
2021-02-02 22:42:02 +01:00
Simon Hausmann
e61529976e
Issue warnings when creating bindings against deprecated properties
2021-02-02 22:42:02 +01:00
Olivier Goffart
294cf9bbe3
Convert from literal 0
to any unit-like types
...
cc #68
2021-02-02 15:38:07 +01:00
Olivier Goffart
f2ab456a7b
Test the .60 snippet in the documentation
2021-02-02 14:56:22 +01:00
Simon Hausmann
69a1b7d4b7
Prospective fix for preview of focus handling example
2021-01-29 16:50:45 +01:00
Olivier Goffart
c2390e4c9f
Fix the @children documentation example not to panic
2021-01-29 10:26:16 +01:00
Olivier Goffart
4d3fabda1b
Document globals
...
CC #96
2021-01-29 09:18:06 +01:00
Olivier Goffart
07df517473
Replace $children
with @children
2021-01-28 11:55:08 +01:00
Simon Hausmann
1bf5a56c39
Rename initial-focus
to forward-focus
2021-01-20 15:52:58 +01:00
Olivier Goffart
38a3c0655c
Add support for \u{xxx} escape sequences in stirng literal
2021-01-20 09:11:06 +01:00
Olivier Goffart
8dc79699de
String template concatenation
...
Currently not supported in the sixtyfps macro
2021-01-18 16:09:58 +01:00
Olivier Goffart
ba6ff5736c
String Escaping
2021-01-18 13:36:23 +01:00
Olivier Goffart
0d2d48be4f
Rename "signal" to "callback"
2020-12-18 09:51:01 +01:00
Olivier Goffart
a37a287a17
Limit the conversion from percentage to lenght for the width and height property
2020-12-04 11:20:09 +01:00
Olivier Goffart
bff55d4f1b
Return value for signal
2020-12-01 18:52:51 +01:00
Simon Hausmann
6fba6aca56
Consistency fix for transitions API
...
Use "in" and "out" instead of "to" and "out".
2020-12-01 11:18:47 +01:00
Simon Hausmann
515d78d3bd
Remove two todos in the language reference
2020-12-01 11:03:55 +01:00
Olivier Goffart
20b4d8826b
Make the extra documentation page a bit more visible
2020-11-23 10:55:05 +01:00
Olivier Goffart
dd4435fe5d
Add round/ceil/floor
2020-11-16 12:52:01 +01:00
Olivier Goffart
7bfc199acb
Documentation for the builtin functions
2020-11-13 16:11:04 +01:00
Olivier Goffart
11e55dd8d2
String -> Float conversions
2020-11-03 15:19:58 +01:00
Olivier Goffart
d3801e26d3
Change the syntax of structures to require the struct keyword
2020-10-27 16:09:05 +01:00
Olivier Goffart
76b7f1aef6
Allow dashes in identifier
...
Currenly, dashes are normalized to '_'.
Dashes are not allowed at the begining of an identifier.
If an identifier with a dash is not found, we also look for identifier
without a dash and if that exist, we hint the user to use spaces.
Issue #52
2020-10-22 18:32:25 +02:00
Simon Hausmann
3b051f2176
Clarify hexadecimal color encoding
...
We parse hex colors as per CSS, including the #RRGGBBAA variant, as per
https://www.w3.org/TR/css-color-4/#hex-notation . This is now documented
and the JS conversion also generates that instead of #AARRGGBB.
2020-10-19 16:38:58 +02:00
Simon Hausmann
13f845ee4f
Add support for property<percent>
2020-10-16 18:56:54 +02:00
Simon Hausmann
cf87ac804b
Add support for relative lengths
...
Typically `some_length_prop: 40%` produces an error, but if there's a
matching property in the parent, then it will be allowed and interpreted
as relative value and creates a dynamically updated binding.
2020-10-16 18:54:04 +02:00
Simon Hausmann
a695d551da
Small typo fix
2020-10-16 14:59:58 +02:00
Simon Hausmann
6c45ccc8a6
Fix syntax error in docs
...
The syntax updater found this one :-)
2020-10-16 12:30:11 +02:00
Simon Hausmann
6aa292eac1
Change the names of the logical and physical pixel units
...
The logical pixels are now just called "px" and the less frequently
used physical pixels have the "phx" suffix.
The existing markup was adapted using the syntax updater and the
following patch:
+ if node.kind() == SyntaxKind::NumberLiteral {
+ if node.text().ends_with("lx") {
+ return write!(
+ file,
+ "{}px",
+ node.text().as_str().split_at(node.text().as_str().len() - 2).0
+ );
+ }
+ if node.text().ends_with("px") {
+ return write!(
+ file,
+ "{}phx",
+ node.text().as_str().split_at(node.text().as_str().len() - 2).0
+ );
+ }
+ }
Fixes #49
2020-10-16 07:19:40 +02:00
Olivier Goffart
519de0f860
Allow convertion of object type even if a property is missing
2020-10-14 13:53:44 +02:00
ritschwumm
f236a7b7c7
fix typos
2020-10-14 09:18:06 +02:00
Simon Hausmann
e301c19fd0
Fix typo
2020-10-12 21:24:43 +02:00