Olivier Goffart
236011d17c
Make ComponentDefinition::properties only list the public properties as it should
...
Fixes #242
2021-05-25 15:48:22 +02:00
Simon Hausmann
ea8e8318b6
Trim the text example a little
...
So that perhaps we can avoid the horizontal scrollbar
2021-05-25 12:58:13 +02:00
Simon Hausmann
843a2c9e7a
Fix doc syntax error
2021-05-25 11:48:28 +02:00
Simon Hausmann
7acbe93bf1
Adjust the pin of femtovg
...
The blur is now in master, so use that instead until release.
2021-05-25 11:32:46 +02:00
Simon Hausmann
d7a8d03475
Attempt at improving the Text
docs
...
Try to clarify the line breaking behavior with an example.
2021-05-25 11:31:05 +02:00
Olivier Goffart
8c6eb65f1c
Few adaptations of the renamed viewer
2021-05-22 09:30:57 +02:00
Rishabh Budhiraja
74727d953f
Renames viewer to sixtyfps-viewer and publishes it on crates.io ( #237 )
...
* Renames viewer to sixtyfps-viewer and publishes it on crates.io
* Maintain the directory name consistency
2021-05-22 08:34:50 +02:00
Simon Hausmann
cc9d5e09f0
Add support for clip on Path elements
...
This allows clipping the viewbox conveniently.
2021-05-21 19:51:00 +02:00
Simon Hausmann
7de783bbe1
Remove unnecessary viewbox position
2021-05-21 19:51:00 +02:00
Simon Hausmann
11ab32f54f
Fix typo in viewbox docs
2021-05-21 19:51:00 +02:00
Simon Hausmann
81eab75c25
Add missing changelog for viewbox properties
2021-05-21 19:51:00 +02:00
Simon Hausmann
e7bc91c804
Add support for specifying the viewbox of path elements
2021-05-21 19:51:00 +02:00
Olivier Goffart
74418db9ad
Try to create the window with a proper size already
...
CC #235
2021-05-21 18:43:41 +02:00
Simon Hausmann
655aff24e4
Fix CI
...
Remove trailing whitespace to silence cargo fmt
2021-05-21 17:52:29 +02:00
Simon Hausmann
431c433e8b
Clean up blur effect C++ code
...
Use Olivier's advice and use the more modern using declaration to access
the draw function, locally.
2021-05-21 17:33:21 +02:00
Simon Hausmann
1d92ab4d36
Simplify Qt blur effect application slightly
...
Call draw on the blur effect directly instead of going through QGraphicsScene::render().
2021-05-21 17:33:21 +02:00
Simon Hausmann
27dcfa0f11
Improved rendering of drop shadow for Qt
...
Use QGraphicsBlurEffect as public API to take the blur into account
2021-05-21 17:33:21 +02:00
Olivier Goffart
8b16509422
Fix wasm build
2021-05-21 16:41:51 +02:00
Olivier Goffart
edfa6319b2
Fix alias to globals with the interpreter
2021-05-21 16:03:57 +02:00
Olivier Goffart
896336c5c6
interpreter: Make GlobalComponent actual dynamic component
...
Will be required to fix the bug setting two way binding to global
poprerties
2021-05-21 15:25:56 +02:00
Olivier Goffart
2265dd04e4
interpreter: wrap ComponentDescription in a ErasedComponentDescription
...
I'll need that for globals
2021-05-21 12:25:37 +02:00
Olivier Goffart
1aed36d122
Be sure to propagate the fact that properties are changed for aliases
2021-05-21 10:06:26 +02:00
Olivier Goffart
0df8161a6b
Also require Qt 5.15 in the main CMakeLists
2021-05-21 08:01:30 +02:00
Olivier Goffart
22c631baf9
Only compile the qt_viewer example if Qt >= 5.15
2021-05-21 07:54:31 +02:00
Olivier Goffart
1f46fd05ec
Allow the qt_viewer to compile if cmake finds qt, but not qttypes
...
This can happen when setting the SIXTYFPS_NO_QT env variable
cc #232
2021-05-21 07:45:38 +02:00
Simon Hausmann
5f6ed2488e
Avoid link error when cargo found Qt but CMake didn't
...
When using cmake to configure the C++ build and Qt is found, and then
build with `SIXTYFPS_NO_QT=0 cmake --build ..`, the C++ library is built
without Qt support but qt_viewer is built. Linkage then fails when it
tries to access the API in libsixtyfps_cpp.so that provides the QWidget,
as that symbol is not present.
So with newer CMake we use find_package to provide positive information
to the cargo build about where Qt is, and consequently this patch
provides negative information to disable Qt support if CMake could not
find Qt -- or it was deliberately disabled for example using
`-DCMAKE_DISABLE_FIND_PACKAGE_Qt5=1`.
cc #232
2021-05-20 20:33:07 +02:00
Olivier Goffart
7f117829f2
Display a warning if Qt is older than 5.15
...
cc #232
2021-05-20 18:28:52 +02:00
Olivier Goffart
91b43017ad
Fix build
2021-05-20 18:28:52 +02:00
Simon Hausmann
235e102f31
Fix slide puzzle not showing with the Qt backend
...
The window in .60 in the slide puzzle has no preferred size set. Therefore fall back to QWidget::sizeHint().
2021-05-20 18:19:20 +02:00
Olivier Goffart
a1880bd943
Report an error when trying to convert from logical to physical coordinate in a global
2021-05-20 18:11:58 +02:00
Olivier Goffart
8f94099a7e
Fix reporting of uncalled "max" in imports
2021-05-20 18:11:58 +02:00
Simon Hausmann
b7ab299de0
Fix C++ iot-dashboard build with older CMake versions
...
... by excluding it from the build with <= 3.16 :-)
Also pin fmtlib to the latest release, instead of master - to be on
the safe side.
Fixes #232
2021-05-20 16:56:51 +02:00
Olivier Goffart
6540fd48ae
GL backend: set the proper size on the rendering context
...
Otherwise we draw garbage with wayland
2021-05-20 15:19:33 +02:00
Olivier Goffart
fb690dc815
Fix infinite resize in Gnome (wayland)
...
The gnome compositor don't like when we resize the window while it
is being resized by the user
Fixes #226
2021-05-20 13:41:26 +02:00
Olivier Goffart
59b12d20e8
Update sixtyfps_compiler/generator.rs
...
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2021-05-20 13:40:51 +02:00
Olivier Goffart
a071738a4a
Fix initialization order of globals
2021-05-20 13:40:51 +02:00
Olivier Goffart
6d48468823
Don't recurse when we can use cached value
...
Also avoid stack overflow in case of infinite loop
2021-05-20 13:40:51 +02:00
Olivier Goffart
2a1c7a9154
Mark aliased property of public api as set
...
So we don't optimize away binding that points to them
Fix the two_way_simple.60 test
2021-05-20 13:40:51 +02:00
Olivier Goffart
6fae458c2d
Properly merge analysis of base component
2021-05-20 13:40:51 +02:00
Olivier Goffart
83edd6534b
Fix move declaration not moving the analysis
2021-05-20 13:40:51 +02:00
Olivier Goffart
ff368db505
Interpreter: make sure that the properties are initialized in the right order
2021-05-20 13:40:51 +02:00
Olivier Goffart
a79a4351b5
Be smarter at detecting the constant property and at not generating bindings
...
this implies that we need to make sure the property are initialized in
order so that constant properties that depends on other constant properties
are correctly computed
2021-05-20 13:40:51 +02:00
Olivier Goffart
a92d1af03c
Move the public api check in its own passes
...
The pass must be done at the begining so that synthetised property don't
become public, and also so that analyses pass can use the public api information
2021-05-20 13:40:51 +02:00
Olivier Goffart
54be5f3a84
Some ground work to make more binding analysis
...
- Mark builtin properties that are modified by the native code as output
- Record wether the property is set by code in the .60
- Add a field that will tell us if a property binding is constant
2021-05-20 13:40:51 +02:00
Simon Hausmann
a7ce64657c
Restore source compatibility for drop-shadow-blur
...
Let's keep source compatibility and define `drop-shadow-blur` to be a radius.
The CSS spec says that the standard deviation is half of the radius.
We just need to scale again and increase the shadow rect to make sure that no borders are visible.
2021-05-20 12:14:05 +02:00
Olivier Goffart
a41f56ff8e
Don't use deprecated symbol
...
The new alternative is new in Rust 1.52, so this raise the minimum
supported rust version
2021-05-20 11:19:56 +02:00
Simon Hausmann
6811f0e1b6
Fix sixtyfps-compiler aborting when using -f rust
...
Apply the same fix as in 6742241d34
2021-05-20 10:38:59 +02:00
Simon Hausmann
2ba883b8e2
Fix WebGL demos
...
Commit bb7b301b10
pulled in a branch of femtovg, which
had a change to its shader that used a variable in the loop condition.
That is unfortunately not supported in WebGL 1.0 / GLES 2.0.
The pinned femtovg works around that limitation.
Fixes #230
2021-05-20 09:39:28 +02:00
Simon Hausmann
8d278faac2
Make the drop shadow more subtle in the slide puzzle
...
In the current upstream version it's very very subtle.
2021-05-20 09:02:45 +02:00
Simon Hausmann
9a4dc4a8dc
Clean up femtovg crate dependencies
...
Let only the GL backend depend on femtovg, by moving the color functions.
This way it's easier to change the femtovg version in one place.
2021-05-20 08:56:11 +02:00