Simon Hausmann
033cf3721e
Improve performance of opacity rendering
...
Avoid an opacity layer also in the case where it is applied to an element with no children.
2022-03-25 10:50:02 +01:00
Simon Hausmann
bef31d3169
Rename the layer
boolean property to cache-rendering-hit
2022-03-21 20:22:43 +01:00
Simon Hausmann
535e134223
Add a Layer element that's created when using a layer boolean property
...
For now no backend implements this optimization hint.
2022-03-21 20:22:43 +01:00
Simon Hausmann
d97710f3f9
Implement correct opacity for the GL backend
...
This also separates the blend-to-screen part of render_layer into a
helper function, as that will be useful in the future with public layer
elements.
Relates to #725
2022-03-18 16:35:26 +01:00
Simon Hausmann
91b3765e97
Improve method naming in ItemRenderer
...
Use `visit_` for the pattern where the trait offers a default implementation that calls other
methods to do the actual work.
2022-03-18 15:42:49 +01:00
Simon Hausmann
f04f0a3e48
GL backend: use direct layers for non-rectangular clips
...
Delegate the decision how to implement the Clip element entirely into the backend,
where the GL backend can now explicitly render
children into a layer, instead of the hack with a layer in the renderer's
state and the extra save/restore pair.
2022-03-18 15:42:49 +01:00
Simon Hausmann
6a6a26569d
Add support for rendering complex clip paths into cached layers
...
If the renderer supports it, clip elements with a complex clip render
the sub-tree into a cached layer.
2022-03-18 15:42:49 +01:00
Simon Hausmann
75949e702c
Prepare item rendering for children self-handling
...
The render function now takes a self_rc and returns a enum that permits
the implementation to handle rendering of children on its own and
thus make the caller skip that traversal step.
2022-03-18 15:42:49 +01:00
Lukas Jung
c15b0e1486
Add focus and keyboard control to native/qt spinbox
2022-03-02 17:51:31 +01:00
Tobias Hunger
f3feab1267
Implement ptr_eq for VWeak and PartialEq for Items ( #976 )
...
* Implement ptr_eq for VWeaks
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2022-02-21 17:45:18 +01:00
Tobias Hunger
6795d3ee00
Introduce a FocusEventResult enum ( #975 )
2022-02-21 17:43:41 +01:00
Olivier Goffart
f9fd523583
Update internal/core/items.rs
...
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2022-02-15 12:02:27 +01:00
Olivier Goffart
efd6c63b8e
Fix animation in the flickable
...
This is a regression since the introduciton of iteration_count which defaults
to 0 for animation started programatically
Also add a test.
Fix #951
2022-02-15 12:02:27 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
...
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Tobias Hunger
de4e195280
Rename internal crates and add a README.md to them
...
The README.md contains the warning that used to be in lib.rs.
Add README.md files to all internal crates
... pointing to the official public crate to use instead.
Rename internal crates
fixup: README files
fixup rename
2022-02-07 13:12:48 +01:00
Simon Hausmann
125b90a64b
Merge remote-tracking branch 'origin/master' into wip/rename
...
Conflicts:
api/cpp/cbindgen.rs
api/cpp/include/slint.h
examples/CMakeLists.txt
examples/imagefilter/Cargo.toml
examples/plotter/main.rs
internal/backends/mcu/lib.rs
2022-02-04 16:47:20 +01:00
Tobias Hunger
b348d1af44
PropertyAnimation: Make iteration-count: n
run animations n times
...
Side-effect: The code handles invalid inputs to duration/delay better.
2022-02-04 10:42:25 +01:00
Olivier Goffart
c00884d5a2
Rename SixtyFPSElement
2022-02-02 14:29:30 +01:00
Simon Hausmann
7d297da2fc
Rename the sixtyfps C++ namespaces
2022-02-02 12:11:27 +01:00
Simon Hausmann
c846633708
Rename C ffi functions
2022-02-02 11:12:34 +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
Simon Hausmann
8399de5c6a
Rename the sixtyfps-corelib-macros crate
2022-02-01 18:03:47 +01:00
Tobias Hunger
e6b24bceec
[reorg]: Set up and populate the internal
directory
...
Move "internal" crates into the `internal` directory. This first batch
includes most of sixtyfps_runtime but leaves the rendering backends
alone for now.
pre-commit applied some cleanups to the moved files:
- Consistent newline at end of file policy
- trimming trailing whitespace
- Formatting Cargo.toml files.
2022-01-31 16:00:50 +01:00