Simon Hausmann
3d3606a8f1
Remove unused rust module
...
This file is not needed anymore
Amends commit 5df6c99f4f
2021-02-03 08:56:53 +01:00
Simon Hausmann
16a7585d07
Hack to make the demos start up with latest macOS and GL backend
...
The fallback list has changed slightly and it appears that SIP is
slowing down reading ~75MB font files.
This is sub-optimal though, font-kit shouldn't assert on certain fonts
and it should really mmap fonts instead of
reading them into memory.
2021-02-03 08:55:44 +01:00
Simon Hausmann
93c0fe54ea
Prepare for using graphics::Brush in the rendering backends
...
by introducing mappings to QBrush and femtovg::Paint
2021-02-03 08:39:53 +01:00
Simon Hausmann
e8b64be9bd
Issue a warning when accessing a deprecated property through component scopes
2021-02-03 08:03:01 +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
308f51add7
Print warnings generated by doc tests
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
cd00da0f24
Fix doctests on windows
2021-02-02 15:34:05 +01:00
Olivier Goffart
f2ab456a7b
Test the .60 snippet in the documentation
2021-02-02 14:56:22 +01:00
Olivier Goffart
e37fe371ac
Silence warning about unread value
2021-02-02 09:03:31 +01:00
Olivier Goffart
2d91124787
CI: Deny warnings
2021-02-02 09:03:31 +01:00
Simon Hausmann
40847a5563
Expose LinearGradientBrush also in C++
2021-02-02 08:44:53 +01:00
Olivier Goffart
54c979d9e6
Make it so that you don't need to run xtask through cargo
2021-02-02 08:39:06 +01:00
Simon Hausmann
9b1fd52231
Fix class vs. struct mismatch
2021-02-01 20:36:08 +01:00
Simon Hausmann
efb496fc25
Add C++ constructors for sixtyfps::Brush
2021-02-01 20:33:40 +01:00
Simon Hausmann
8c3ab3608a
Fix corrision build
...
Set CARGO_MANIFEST_DIR for the bindgen xtask as when run through cargo
2021-02-01 20:27:55 +01:00
Olivier Goffart
7613b9231f
Rename the rust test driver in a consistant way
2021-02-01 18:45:14 +01:00
Olivier Goffart
50ce2d08fd
Split the nodejs and the interpreter test driver
2021-02-01 18:43:48 +01:00
Olivier Goffart
c25f383308
WIP: split interpreter and nodejs
2021-02-01 18:37:24 +01:00
Olivier Goffart
6b20d05efb
Move the C++ driver to its own crate
2021-02-01 18:34:49 +01:00
Olivier Goffart
09ce4142a5
Some reorganization of the testdriver
2021-02-01 18:13:19 +01:00
Olivier Goffart
f1491dc724
Remove unused function
2021-02-01 18:13:19 +01:00
Olivier Goffart
efd6a5479c
don't make xtask depends on the test driver lib
2021-02-01 18:13:08 +01:00
Simon Hausmann
488d71042e
Fix test build
2021-02-01 16:53:44 +01:00
Simon Hausmann
f33b26fa93
Make Brush compile for C++
...
A few changes were required:
* `LinearGradient(LinearGradient)` as enum variant unfortunately
won't compile because the cbindgen generated constructor
function (`LinearGradient()`) will try to also instantiate the
variant type inside (`LinearGradient`) and that won't find the type
but the function itself and error out. So the inner type is now
called `LinearGradientBrush`.
* The same name dance was required for `Color`, where the enum variant
instead is called `SolidColor`
* `BrushInner` was removed in favor of just `Brush`. The nicer Rust
API will be the public variant, and for cbindgen we can just put
the generated enum into an internal namespace, like we do for
Resource for example
* A `NoBrush` variant was added. Maybe that name could be improved?
2021-02-01 16:51:04 +01:00
Simon Hausmann
69508575ec
Fix rendering of Flickable
...
It should clip to its geometry
2021-02-01 15:35:36 +01:00
Simon Hausmann
d065e7e879
Add a comment about the "encoding" of LinearGradient
2021-02-01 15:06:19 +01:00
Olivier Goffart
ad1e18764a
Make angle its own type
2021-02-01 14:49:25 +01:00
Simon Hausmann
b90eb04088
Begin with the brush data structure
...
This patch also adds `extend` to `SharedVector`, for convenience.
2021-02-01 14:45:49 +01:00
Olivier Goffart
2d12e118ac
Resolve linear gradients
2021-02-01 14:25:27 +01:00
Olivier Goffart
8ab713c681
Parse @linear-gradient(...)
2021-02-01 14:25:27 +01:00
Simon Hausmann
b608f3b7c0
Split out the path data structures and functions into a separate module
2021-02-01 13:37:47 +01:00
Simon Hausmann
ee2671fe70
Reduce the size of graphics.rs
a little
...
Split out the color related intos into a module of their own.
2021-02-01 13:22:14 +01:00
Simon Hausmann
326d235ff5
Fix calling focus()
on components
...
Fixes #153
2021-02-01 13:05:08 +01:00
Simon Hausmann
08413212f9
Improve rendering of circles with the GL backend
...
Rendering a circle using `rounded_rect` will create a path with `LineTo`
verbs for the edges. Unfortunately those create visible artefacts,
especially in lower resolutions.
Therefore this patch attempts to detect this scenario and draw a circle instead.
Fixes #152
2021-02-01 12:50:26 +01:00
Olivier Goffart
e09fa06226
Fix nested for layouts
...
Fixes #149
2021-02-01 12:38:56 +01:00
Olivier Goffart
2fc9893f1d
Fix shadow for elements in repeater in a layout
...
The child_of_layout needs to be moved to teh right element
2021-02-01 11:55:05 +01:00
Simon Hausmann
4766112887
Fix last letter in Text
sometimes being cut off in layouts
...
Due to stretch using rounding, it may happen that the minimum width will
rounded down, and then later when we draw the text with the calculated width,
we have no choice but cut off the last letter.
Fixes #151
2021-02-01 11:41:04 +01:00
Olivier Goffart
9f93968c66
Fix the publish to crate.io script
2021-01-29 18:19:21 +01:00
Olivier Goffart
b91f945a07
Fix horizontal scrollbar in ugly style
...
the new rendering backend behavior is different if the border radius is bigger
than the small border
2021-01-29 17:41:39 +01:00
Simon Hausmann
c47b10d793
Polish the layout documentation
...
This takes the existing content and polishes it a little bit.
2021-01-29 17:37:54 +01:00
Olivier Goffart
60c80f4e9a
Get ready to publish the docs with the preview.
2021-01-29 17:14:14 +01:00
Olivier Goffart
a36edfffbe
Change the C++ test API of the send_mouse_click
...
So that rust and C++ have the same code that can be copy pasted
2021-01-29 16:55:48 +01:00
Simon Hausmann
69a1b7d4b7
Prospective fix for preview of focus handling example
2021-01-29 16:50:45 +01:00
Simon Hausmann
eb6ff03a73
A bit of changelog formatting
2021-01-29 16:40:27 +01:00
Olivier Goffart
e2db0e49dc
Fix explicit size in box layouts using for
...
Fixes #147
2021-01-29 16:35:59 +01:00