Commit graph

1092 commits

Author SHA1 Message Date
Simon Hausmann
97a93a3157 Make LyonPathIterator private in terms of docs 2020-08-03 12:18:06 +02:00
Olivier Goffart
86a85cf838 vtable: change #[offset] to #[field_offset]
And add a documentation for it
2020-08-03 11:26:48 +02:00
Olivier Goffart
00c32e9c6d vtable: remove the convinient type alias from the macro
If one really need them, they can be implemented by the user
2020-08-03 11:03:24 +02:00
Simon Hausmann
69beab5957 Rename corelib::abi::primitives to corelib::items 2020-08-03 10:32:03 +02:00
Simon Hausmann
72d2a430ee Add missing sixtyfps- prefix to the corelib-macros crate 2020-08-03 10:24:52 +02:00
Simon Hausmann
c29791fbaa Replace a few qualified abi::primitives paths with uses
That'll make it easier to do the next rename :-)
2020-08-03 10:13:32 +02:00
Simon Hausmann
44109130f0 Rename corelib_macro to corelib-macros 2020-08-03 10:01:58 +02:00
Simon Hausmann
6c5d423cd4 Rename sixtyfps_corelib to sixtyfps-corelib 2020-08-03 10:01:58 +02:00
Olivier Goffart
2e74fa43cd Use pin-weak from crates.io 2020-08-03 09:18:04 +02:00
Olivier Goffart
cb67e40c32 Rename WeakPin -> PinWeak 2020-07-31 18:19:26 +02:00
Olivier Goffart
75671c18e7 Rename weak-pin crate to pin-weak 2020-07-31 18:18:12 +02:00
Olivier Goffart
77cf1e1e83 Some documentation change following today review 2020-07-31 16:28:59 +02:00
Olivier Goffart
9760cf4969 Begin to implement a Flickable
The implementation is still very rough and will need to be improved
2020-07-30 14:36:21 +02:00
Simon Hausmann
c32114cee6 Add helper function to calculate the layout info for a grid layout
The minimum/maximum widths/heights are the sum of the cells.
2020-07-30 10:25:08 +02:00
Olivier Goffart
46a011683f Implement easing curve in the runtime 2020-07-29 15:20:28 +02:00
Simon Hausmann
033a1be207 Bump font-kit 2020-07-28 23:03:18 +02:00
Simon Hausmann
c847a7b924 Fix values of width/height properties on initial show on macOS 2020-07-28 14:45:17 +02:00
Simon Hausmann
c102fca828 Move the glyph rasterization code into the new font module in corelib 2020-07-28 14:22:34 +02:00
Olivier Goffart
96a2efcb93 Only recompute the layout when needed 2020-07-28 10:43:06 +02:00
Olivier Goffart
b57f3775c9 Refactor GridLayout 2020-07-28 10:31:05 +02:00
Olivier Goffart
0a722c86b3 Implement layouting_info for everything 2020-07-28 10:31:05 +02:00
Simon Hausmann
4d645dd9a3 Remove fake string_to_glyphs implementation for canvas text
We don't need it
2020-07-28 09:39:31 +02:00
Simon Hausmann
c88a4c44ab Minor cleanup in fontkit code
I think I've found the right placement of lifetime specifiers to fix
string_to_glyphs() to return an iterator instead of allocating a vector :-)
2020-07-28 09:32:18 +02:00
Simon Hausmann
b69afa88d7 Minor cleanup in font handling
The mutability of the font cache should be an implementation detail. Makes the API easier :)
2020-07-28 09:28:43 +02:00
Simon Hausmann
8a2ff4fd5f Provide a basic implementation of layout_info for Text
This also starts moving the rendering independent part of the font handling
to corelib. The next step will be to adapt the rendering code to use that
instead of its own.
2020-07-27 21:36:58 +02:00
Olivier Goffart
d77d7cddc3 The viewer can use the Qt style with --style qt 2020-07-24 18:06:55 +02:00
Olivier Goffart
b8299747c6 WIP: some draft of a Qt style 2020-07-24 17:59:23 +02:00
Simon Hausmann
389c2ab3cd Fix build of C++ tests 2020-07-24 11:08:40 +02:00
Simon Hausmann
9938197b58 Split Rectangle again
Into the previous Rectangle and BorderRectangle that allows (rounded) borders through a stroke in addition to the fill.

Next step is to make the compiler make the choice automatically depending
on the properties used.
2020-07-24 10:15:12 +02:00
Simon Hausmann
dd9bd2cf72 Add a rounded border to the button
There's still an open question about how to avoid the border properties
for all rectangles but allocate them only for those who have a border.
Regardless, this border illustrates the issue with the lack of text sizing.
2020-07-24 09:21:30 +02:00
Simon Hausmann
00f2d384b2 Fix formatting 2020-07-24 07:52:18 +02:00
Olivier Goffart
debd2b5839 Smaller workaround for the fact that some function are not exported 2020-07-23 17:11:00 +02:00
Olivier Goffart
1d7effd030 Add missing files 2020-07-23 11:56:43 +02:00
Olivier Goffart
05c5f7c53d Test and fix animations on properties
The animation should not start when the property is initialized, only when the
property is set by the setter
2020-07-23 11:45:34 +02:00
Olivier Goffart
bfab84288e Property: add a function to get the property without registering a dependency 2020-07-22 17:23:32 +02:00
Olivier Goffart
3f3c47f0ed Property<T>: Add a Binding trait which would allow binding to access the old value 2020-07-22 17:23:32 +02:00
Olivier Goffart
e7d2c35a07 Use triomphe instead of servo_arc
That's a fork of servo_arc which is updated more recently
2020-07-17 17:13:51 +02:00
Olivier Goffart
6c54dfb67d Layout the item in a PathLayout if they are part of a repeater 2020-07-17 15:00:12 +02:00
Olivier Goffart
27c3b2ab5a Fix crash in C++ due to uninitialized CachedRenderingData 2020-07-17 15:00:12 +02:00
Olivier Goffart
5e7d5369aa Few fixes to the layout and add a test that the items are well positioned 2020-07-16 17:22:29 +02:00
Olivier Goffart
dfd4a35e35 Set the DPI property according to the window's screen 2020-07-15 18:46:55 +02:00
Simon Hausmann
ddc4fb6e1f WIP: window size
Just playing around with propagating the width/height of the window.
2020-07-15 17:52:14 +02:00
Olivier Goffart
952ddda7c4 Force duration to have an unit 2020-07-14 16:18:12 +02:00
Simon Hausmann
39359a4e26 Add support for an offset to PathLayout
This allows animating items on their position along the path.
2020-07-14 15:12:03 +02:00
Simon Hausmann
1845e495fe Fix path layout positioning
The local parameter t on a path segment wasn't normalized to the length
of the segment itself.
2020-07-14 14:23:43 +02:00
Simon Hausmann
f8024e6658 Add support for looping in animations 2020-07-14 13:22:28 +02:00
Simon Hausmann
a3f365417c Center items on a path layout 2020-07-14 09:43:59 +02:00
Olivier Goffart
e00491811b Get rid of the context in properties/signal 2020-07-13 18:49:06 +02:00
Olivier Goffart
ab7ae9f3e2 Some refactoring of the rust generated code
Always use a Pin<Rc> for the component. (This is required to support repeater
within repeater as well anyway)
Do not use the context within the binding. We can get along by simply capturing
a weak pointer to the component
2020-07-13 16:37:54 +02:00
Simon Hausmann
1a0d053889 Align default path layout tolerance
Use the same tolerance as when rendering
2020-07-13 16:12:38 +02:00