Olivier Goffart
27ab119233
Updater test: fix the whitelist when there are warnings
...
We should ignore the failing test if all errors are ignored.
warnings don't count
2021-05-18 19:01:55 +02:00
Olivier Goffart
54e77e8583
Updater test: ignore binding loop error
...
The updater can't fix these
2021-05-18 18:32:26 +02:00
Olivier Goffart
76a42cd757
Added support for static constant z ordering
...
Just re-order the children at compile time
2021-05-14 16:17:34 +02:00
Olivier Goffart
c91ea3f615
interpreter test: In case of failure of the test, dump all properties
2021-05-11 14:59:57 +02:00
Olivier Goffart
539a78e807
Rust: implement enough of PathLayout so that the tests passes
...
(does not implement the repeater case)
2021-05-11 14:59:57 +02:00
Olivier Goffart
f99d7de5ad
Fixup layout in rust
2021-05-11 14:59:57 +02:00
Olivier Goffart
720001a223
Remove the solve_layout from the component vtable
...
no longer required
2021-05-11 14:59:57 +02:00
Olivier Goffart
e7d7589538
Decent default binding for the materialized constraints
2021-05-11 14:59:57 +02:00
Olivier Goffart
a990e01cd8
Apply the layout restrictions to the parent element
2021-05-11 14:59:57 +02:00
Olivier Goffart
c6103aa9ce
Fix image geometry in layout
...
since the layout now sets an explicit width and height, we check the priority
to see the difference between something explicitly set, and something set by the layout
2021-05-11 14:59:57 +02:00
Olivier Goffart
b463e3cca4
WIP refactor layout
...
This commit add support for the box layout
2021-05-11 14:59:57 +02:00
Olivier Goffart
21a80f4562
WIP: Layout refactoring
...
Instead of using a solve_layout function in the component, use property to hold
a layout cache.
This commit only implement the GridLayout and only the interpreter part
2021-05-11 14:59:57 +02:00
Olivier Goffart
304699e6bc
Fix C++ tests on windows
2021-05-11 11:40:26 +02:00
Olivier Goffart
675528bfb9
Run the integration test also on windows
...
The code that extract the rust/cpp/js snippets from the testcases
did not work on windows because of the different newline character
2021-05-11 11:40:26 +02:00
Olivier Goffart
7f7f2245d8
Use the testing backend for node
2021-05-11 11:40:26 +02:00
Olivier Goffart
988c2b0b9d
Use the testing backend for the C++ integration tests
2021-05-11 11:40:26 +02:00
Olivier Goffart
a0e910abf0
Use the testing backend for rust
2021-05-11 11:40:26 +02:00
Olivier Goffart
662c52abff
Introduce a "testing" rendering backend and use it for the interpreter test
...
This way the tests can pass even if the tests would otherwise need a running
window, like they do with the GL backend
2021-05-11 11:40:26 +02:00
Olivier Goffart
e074d7ce89
Fix panic when aliases are merged with property in another component
2021-05-07 17:15:45 +02:00
Olivier Goffart
0083bd8d23
Fix return statement in the C++ generated code
...
The template parameter of the ReturnWrapper could be deduced to
a wrong type (eg: int instead of float) so we must add it explicitly
2021-04-27 10:17:09 +02:00
Olivier Goffart
feadcfa25a
Update cbindgen
2021-04-23 16:18:52 +02:00
Olivier Goffart
1f64f7ab27
Also set the preferred size for the GridLayout
...
Issue #182
2021-04-21 18:56:28 +02:00
Olivier Goffart
8ac0fe78ad
Test for the interpreter
2021-04-21 17:15:19 +02:00
Olivier Goffart
14772a9b58
Handle reduction of logical lenght when the units are more complex
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
Simon Hausmann
dbfa5cadde
Fix text rendering with path-clipping
...
When rendering into a layer, we applied the y coordinate system flip
using a transform. That transform is incompatible with
Canvas::fill/stroke_text, which uses transform_point to transform the
glyph quads. That appears to not work, as opposed to the
y-flip in the main vertex shader.
Fortunately we can work around it by doing the flip when rendering the
layer image (as part of the fill).
Closes #199
2021-04-20 22:25:59 +02:00
Simon Hausmann
f50d573120
GL backend: Add support for path clipping, used for rounded rects
...
Render the sub-tree of items into an intermediate image and fill the
clip path with that image.
Fixes #199
2021-04-20 10:26:11 +02:00
Olivier Goffart
862f65c151
Fix panic in the interpreter when accessing uninitialized global
...
As the type of the Value wouldn't match the expected type
Fixes #173
(Also added a way to test the interpreter by making the interpreter
make sure the property "test", if it exists, is true)
2021-04-19 11:41:36 +02:00
Olivier Goffart
87f4a363cf
Add support for opacity property
2021-04-15 15:05:09 +02:00
Olivier Goffart
aeff269bd4
Fix another panic caused by some NamedReference of the layout not being visited
2021-04-14 17:23:33 +02:00
Olivier Goffart
b7f3f39143
Test for previous fix
2021-04-14 16:15:14 +02:00
Olivier Goffart
27ac4f4fc7
Move a testcase in its own folder
2021-04-14 15:48:42 +02:00
Simon Hausmann
48e6d2f48b
Fix handling of non-zero border width in clip-enabled Rectangles
...
The border should be visible (as in the included test case), which this
patch fixes for Qt by subtracting the border width just like when drawing.
2021-04-14 13:34:51 +02:00
Olivier Goffart
e8e0bcb4d0
interpreter test: try to load the examples
2021-04-13 09:49:32 +02:00
Olivier Goffart
380b421507
Fix warning in test
2021-04-12 15:42:58 +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
Olivier Goffart
ca64a540c4
Continue support for rgb() function
...
Fixup of previous commit which was part of https://github.com/sixtyfpsui/sixtyfps/pull/139
2021-04-12 15:18:25 +02:00
Olivier Goffart
366ce83dae
Fix crash with repeater in a Flickable
2021-04-12 10:35:30 +02:00
Olivier Goffart
563866a60f
Remove debug assertion that is not always true
...
because Int32 and Float32 can be compared but aren't the same type
2021-04-09 19:28:32 +02:00
Olivier Goffart
b45190ca2d
Flickable geometry
...
Issue #192
2021-04-09 19:14:48 +02:00
Simon Hausmann
9a06a29314
Implement dynamic image-fit and aspect ratio behavior for Image elements
...
This is part of #168 where `image-fit` has dynamic defaults and missing
width or height property bindings are installed with an aspect ratio
preserving behavior.
2021-04-09 15:17:52 +02:00
Simon Hausmann
81dcd02dd5
Improve preferred size test
...
Test not only the regression that 843f52b3c5
introduced but also test that
the application of the preferred size on the layout axis works.
2021-04-08 20:04:50 +02:00
Simon Hausmann
794d3ec6ec
Revert "Add a nodejs testing function for apply_layout"
...
This reverts commit beb5d63d1b
.
Oops, the more modern style *is* to use send_mouse_click.
2021-04-08 16:58:37 +02:00
Simon Hausmann
beb5d63d1b
Add a nodejs testing function for apply_layout
...
This will allow making the JS test code more similar to the C++/Rust code,
allowing replacing synthetic mouse clicks.
2021-04-08 16:51:51 +02:00
Simon Hausmann
8fb0c060d6
Add JS test for cross axis box preferred size test
...
Amends commit 1cfbbb090a
2021-04-08 16:36:29 +02:00
Simon Hausmann
1cfbbb090a
Fix standalone build of test-driver-interpreter
...
Calling `sixtyfps_interpreter::print_diagnostics` requires the diagnostics feature in the interpreter.
2021-04-08 16:13:53 +02:00
Simon Hausmann
c448003e2f
Add test case for preferred size in boxes bug
...
Amends commit 7c1738eeea
This also adds the preferred-width/height fake properties to allow overriding.
2021-04-08 16:13:53 +02:00
Olivier Goffart
3cad21c23f
Test for my previous commit
2021-04-08 15:45:30 +02:00
Olivier Goffart
96ee9ea7a0
GridLayout: Element outside of a Row should go in a new row
2021-04-08 11:46:24 +02:00
Olivier Goffart
9416b0a3d9
Upgrade version of cbindgen
2021-04-07 13:39:58 +02:00