Olivier Goffart
5dfa2549c8
Put the named reference in a Rc so it will be easier to compute the use count and suck
2021-03-29 15:16:41 +02:00
Olivier Goffart
3db3400951
Rename the Object type to Struct in the compiler
2021-03-16 12:38:53 +01:00
Olivier Goffart
730b1ccff2
Refactor diagnostic: Merge BuildDiagnostic and FileDiagnostic
2021-03-12 19:32:50 +01:00
Olivier Goffart
fc35d101d9
Rename diagnostics::level to DiagnosticLevel
2021-03-11 16:27:40 +01:00
Olivier Goffart
968dfaae87
Put what is the FileDiagnostics into the SourceFile so the SourceFile has the content
2021-03-11 16:23:46 +01:00
Olivier Goffart
7c48bcdd4c
Add the source file getter to the Spanned trait, and remove SpannedWithSourceFile
2021-03-11 14:09:55 +01:00
Olivier Goffart
436d113b1e
Rename ResourceReference
to ImageReference
in the compiler
2021-03-11 10:29:05 +01:00
Simon Hausmann
3d7eb6ac70
Fix brightening function name in .60
...
An earlier revision of the patch called it `lighter` and it was renamed
to `brighter`, as bright is the opposite of dark. But the function name
in .60 wasn't changed yet.
Amends commit 391d0152f0
2021-02-24 13:40:27 +01:00
Simon Hausmann
391d0152f0
Add Color::brighter/darker functions
...
These are exposed in .60 as well as in Rust and C++ and implemented by
converting to HSV color space and adjusting the brightness (value).
2021-02-24 10:49:27 +01:00
Olivier Goffart
5727a4cf02
implement square root
2021-02-20 08:53:08 +01:00
Simon Hausmann
2f3c280ebe
Fix cargo fmt --check
...
Not sure what happened but I guess the new release made it stricter
2021-02-18 13:45:42 +01:00
Simon Hausmann
8b28c4d792
Fix compilation with empty image urls when resource embedding is enabled
...
`@image-url("")` should translate to `Resource::None` instead of
`Resource::AbsolutePath` to avoid that the rust compiler tries to
include a directory when embedding images.
2021-02-17 16:01:54 +01:00
Olivier Goffart
92f9402a39
Fix C++ compilation if using condition between 0 and a unit type
2021-02-16 18:40:32 +01:00
Olivier Goffart
ed1fc31b84
Put the window background color in the StyleMetrics
...
And make use of Window::background in Qt
2021-02-15 15:57:58 +01:00
Olivier Goffart
861e76b0ef
Fix vinding when two native property are linked
...
Fixes #161 again
2021-02-12 21:40:34 +01:00
Olivier Goffart
096f55e365
Change behavior of percent sice within the layout
...
So that size with percentages don't affect the maximum/minimum size
Fixes #117
2021-02-11 20:32:26 +01:00
Olivier Goffart
0174db3679
Delay the percentage size conversion to after the layouting phase
...
So we can see inthe layouting phase if the size was in percent
2021-02-11 15:08:24 +01:00
Simon Hausmann
2ce672bd68
Reduce dependencies
...
Use only specific lyon packages instead of pulling all of them in.
This slightly speeds up compilation as well as for example lyon_tesselation
doesn't need to be compiled anymore.
2021-02-09 17:22:01 +01:00
Olivier Goffart
0f251a7b82
Fix merge of two way binding
...
collext the set of all binding mapping to the same property, and only keep
the binding with the highest priority
Fixes #161
2021-02-08 18:58:23 +01:00
Olivier Goffart
431ce88326
sin/cos/tan and asin/acos/atan
2021-02-08 12:23:31 +01:00
Olivier Goffart
a8475d062c
Fix the priority when inlining and improve debug output
...
This is just an improvement on 55726cc10d
but is not yet a complete fix for #161 , because we do not merge all
bindings that still need to be merged
2021-02-08 10:17:35 +01:00
Olivier Goffart
55726cc10d
fix two way binding when they are declared twice
...
Fix the galery's disable button not disabling most widgets
2021-02-05 18:33:28 +01:00
Olivier Goffart
b75e135459
Support complex product of units
...
Fixes #68
2021-02-04 12:56:14 +01:00
Olivier Goffart
4643706409
Make sure linear gradiant always have all its stops
2021-02-03 15:42:35 +01:00
Simon Hausmann
94f24d1adc
Allow parsing linear gradients when the target property is a brush
2021-02-03 13:09:58 +01:00
Simon Hausmann
7982325da4
Change Rectangle::background's type to be a brush
...
This also introduces the brush type in the compiler and generators. At the
moment only conversion from Color is implemented.
2021-02-03 12:49:44 +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
246398fcb3
Issue a warning when accessing deprecated properties through member lookups
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
e37fe371ac
Silence warning about unread value
2021-02-02 09:03:31 +01:00
Olivier Goffart
ad1e18764a
Make angle its own type
2021-02-01 14:49:25 +01:00
Olivier Goffart
2d12e118ac
Resolve linear gradients
2021-02-01 14:25:27 +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
Olivier Goffart
e2db0e49dc
Fix explicit size in box layouts using for
...
Fixes #147
2021-01-29 16:35:59 +01:00
Olivier Goffart
97917c43db
Fix selecting the minimal class when no properties are used
...
Otherwise `Rectangle{}` would be a BorderRectangle
2021-01-28 18:52:39 +01:00
Olivier Goffart
82aa658cef
Update rowan
2021-01-28 15:37:01 +01:00
Olivier Goffart
bb4212f0aa
Remove bang macro support
2021-01-28 11:49:24 +01:00
Olivier Goffart
5debc08f98
Parse @image-url
2021-01-28 11:49:24 +01:00
Simon Hausmann
f8eec03296
Allow drop-shadow on Clip
...
Commit d03da6b57b
illustrates how this
would be rather convenient. Eventually perhaps `Clip` can turn into a
boolean `clip: true` property.
2021-01-28 08:40:09 +01:00
Simon Hausmann
ab25faa24f
Add automatic creation of BoxShadow
elements through drop-shadow
properties on Rectangles
2021-01-27 19:02:23 +01:00
Olivier Goffart
edcd4b1d0b
Move the generate_item_indices function in a a passes modules
2021-01-27 09:21:26 +01:00
Olivier Goffart
397ccf518a
Properly error when the return value of a signal is missing
2021-01-26 17:18:01 +01:00
Olivier Goffart
9de5af75ce
Allow FocusScope to reject the events
2021-01-26 17:05:31 +01:00
Olivier Goffart
7ac219e6d2
Return statement: check that the return type is correct
2021-01-25 15:32:00 +01:00
Simon Hausmann
b22bbb1c0f
WIP: Implement the return statement
2021-01-25 15:32:00 +01:00
Simon Hausmann
f502be9299
Fix nested structures
...
When the nested structure was only referenced indirectly, we weren't collecting it for code generation.
2021-01-25 14:12:24 +01:00
Simon Hausmann
7ef8a866d9
Add support for qualified enum lookups
2021-01-25 10:44:17 +01:00