Simon Hausmann
cc9d5e09f0
Add support for clip on Path elements
...
This allows clipping the viewbox conveniently.
2021-05-21 19:51:00 +02:00
Olivier Goffart
8f94099a7e
Fix reporting of uncalled "max" in imports
2021-05-20 18:11:58 +02:00
Olivier Goffart
e163794549
Fix panic when a non-element type is used as an element
2021-05-07 15:36:10 +02:00
Olivier Goffart
3b73c96c37
Adjust the syntax_tests to the change of length
2021-04-21 17:15:19 +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
87f4a363cf
Add support for opacity property
2021-04-15 15:05:09 +02:00
Olivier Goffart
fed73bbd67
syntax_tests: Try to build the object_tree::document even in case of parse error
...
To make sure it doesn't panic.
Also fix a bunch of errors that were causing panic bacause missing elements in the tree
The goal it to be able to generate a best effort node required for the LSP
2021-04-14 11:46:49 +02:00
Olivier Goffart
533da0ea4c
Add missing file
2021-04-12 19:02:37 +02:00
Simon Hausmann
c8f1389529
Restore test that was accidentally removed
...
It was accidentally removed in commit
9b46e547a2e4fa9beaf23dea8b56458ef4c7c856
2021-02-22 11:17:39 +01:00
Simon Hausmann
13116e8a20
Begin working on the home page
2021-02-22 11:17:38 +01:00
Olivier Goffart
92f9402a39
Fix C++ compilation if using condition between 0 and a unit type
2021-02-16 18:40:32 +01:00
Olivier Goffart
0174db3679
Delay the percentage size conversion to after the layouting phase
...
So we can see inthe layouting phase if the size was in percent
2021-02-11 15:08:24 +01:00
Olivier Goffart
b75e135459
Support complex product of units
...
Fixes #68
2021-02-04 12:56:14 +01:00
Simon Hausmann
3854d1236a
Fix syntax tests
2021-02-03 13:17:57 +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
Simon Hausmann
1f091cb1c0
Rename Rectangle.color to Rectangle.background
...
Add support for built-in property aliases and rename `color` to
`background` - in preparation for it also changing to type brush.
Right now the alias is silent, a deprecation and overall change
will come in a subsequent change.
2021-02-02 17:01:12 +01:00
Olivier Goffart
c479fd132d
Fix panic when @children is in the last component
...
Throw an error instead
Fixes #148
2021-02-02 16:44:09 +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
ad1e18764a
Make angle its own type
2021-02-01 14:49:25 +01:00
Olivier Goffart
2d12e118ac
Resolve linear gradients
2021-02-01 14:25:27 +01:00
Simon Hausmann
6a4f2aa572
Added the two missing path sub-elements for quadratic and cubic curves
2021-01-28 14:14:24 +01:00
Simon Hausmann
a6fbc4c05d
Add missing MoveTo
sub-element for Path
2021-01-28 13:16:25 +01:00
Olivier Goffart
0cc2a40085
Another fixup
2021-01-28 12:03:52 +01:00
Olivier Goffart
07df517473
Replace $children
with @children
2021-01-28 11:55:08 +01:00
Olivier Goffart
23a511b380
Replace img!"..."
by @image-url("...")
2021-01-28 11:49:24 +01:00
Simon Hausmann
6c517b04cf
Fix expected error message
2021-01-28 09:12:06 +01:00
Simon Hausmann
ab25faa24f
Add automatic creation of BoxShadow
elements through drop-shadow
properties on Rectangles
2021-01-27 19:02:23 +01:00
Olivier Goffart
7ac219e6d2
Return statement: check that the return type is correct
2021-01-25 15:32:00 +01:00
Olivier Goffart
78484a75e0
Add string tests I forgot to git add previously
2021-01-19 19:39:42 +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
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
Olivier Goffart
957867d72a
More work on popup
2020-11-30 15:20:51 +01:00
Olivier Goffart
852eeb1c11
WIP popup
2020-11-30 15:20:51 +01:00
Olivier Goffart
a4c538c615
Throw an error when using an element as a property type
...
We currently do not support that
2020-11-30 13:31:02 +01:00
Olivier Goffart
2fdf852289
Add the element name in the error when a property is not found
2020-11-30 13:01:39 +01:00
Olivier Goffart
865e6055f2
Work on transition: lower the transitions
2020-11-20 09:39:06 +01:00
Olivier Goffart
1eb57ae4a3
Add minmax tests
2020-11-13 15:55:42 +01:00
Olivier Goffart
d499e86640
Implement cubic-bezier
2020-11-13 13:36:32 +01:00
Olivier Goffart
97166672c0
Semantic checks for the globals
2020-10-28 07:52:23 +01:00
Olivier Goffart
e85dbfb041
Parse global structure
...
for issue #96
2020-10-28 07:18:24 +01:00
Olivier Goffart
0a8c098779
Remove the component contextual keyword
...
It is not used
2020-10-27 16:09:05 +01:00
Olivier Goffart
1791c1528c
Fixup test
2020-10-19 19:43:13 +02:00
Olivier Goffart
1de39e5769
String concatenation
2020-10-19 18:37:15 +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
bdcf1d6c1f
I forgot to add the tests of one of my previous commits
2020-10-13 09:06:36 +02:00
Simon Hausmann
765f2790ba
Fix failing syntax tests
...
After commit 0c8a31211e
we're using an
older version of the regex crate, that uncovered a bug in our tests:
We were looking for
Use parentheses to disambiguate && and ||
in the output messages by interpreting this as a regular expression. The
newer version of regex considered the || in the above regex as
alternations, empty alternations. So they basically always matched.
The old regexp that's pinned due to the above commit doesn't support
empty alternations, so the || need to be escaped. That uncovered a bug
in the regex itself, where it turns out that the word "between" was
missing after "disambiguate".
2020-10-12 16:37:21 +02:00