Tobias Hunger
aeebbb1d96
Janitor: Fix remaining clippy::option_map_unit_fn
2021-07-21 19:44:57 +02:00
Olivier Goffart
a987b225b5
Collect all used components before inlining
...
And do some passes before inlining
We will need the list of components before inlining in order to generate
them if we disable inlining
So we can do some passes on each component before they are inlining
I tried to put the flickable pass in that list, but it did not work
if the Flickable itself is the root of a component
2021-07-07 17:58:43 +02:00
Tobias Hunger
e5bdeaa804
Janitor: Remove unnecessary &
2021-07-07 08:42:28 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +02:00
Tobias Hunger
13d7f5e7bd
Janitor: Fix typos in comments and user-facing strings
...
Also adapt tests for error messages containing the fixed strings.
No behavior change is intended!
2021-06-28 08:32:25 +02:00
Olivier Goffart
9d2bd11098
Error when having an animation in a transition on a property which is not part of the state
...
Fixes #255
2021-06-23 13:05:25 +02:00
Olivier Goffart
a97bcd5ae1
Use BTreeMap unstead of HashMap to store the bindings
...
Because the order is important to keep deterministic error and output
2021-06-18 21:47:00 +02:00
Olivier Goffart
42c25248a8
Allow to give a name to for
and if
2021-06-18 16:40:40 +02:00
Olivier Goffart
0b6bd7b219
Fix accessing elided property
...
Fixes #177
2021-06-18 15:08:30 +02:00
Olivier Goffart
7aba0f2a0b
Layout split of horizontal/vertical
...
Rust part
2021-06-16 15:14:07 +02:00
Olivier Goffart
deaa0fddb0
WIP layout: split vertical and horizontal cache
...
Split the vertical and horizontal pass into different property cache
This will allow to implement "height for with"
This patch does not port the Rust or C++ binding yet
2021-06-16 15:14:07 +02:00
Olivier Goffart
6c1aa9bd8f
Add a pass to always have the top level as a Window
2021-06-09 11:02:55 +02:00
Olivier Goffart
ce34ff87d0
Finish support for callback aliases
...
cc #111
2021-06-07 20:40:36 +02:00
Olivier Goffart
3ddc3c6ce5
Don't re-use Type::Void for inferred type
...
Make it explicit that it is inferred, and differentiate callback and property
2021-06-07 20:40:36 +02:00
Olivier Goffart
715d38903f
Allow to omit the type of aliases
2021-06-07 10:48:09 +02:00
Simon Hausmann
96aeffa092
Accept .otf files
...
ttf_parser (used by rustybuzz and femtovg) supports them, and Qt supports them, too.
2021-06-03 10:55:58 +02:00
Olivier Goffart
6fae458c2d
Properly merge analysis of base component
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
Olivier Goffart
a990e01cd8
Apply the layout restrictions to the parent element
2021-05-11 14:59:57 +02:00
Olivier Goffart
a43c2bb50a
Component pretty print with indentation
2021-05-11 14:59:57 +02:00
Olivier Goffart
21a80f4562
WIP: Layout refactoring
...
Instead of using a solve_layout function in the component, use property to hold
a layout cache.
This commit only implement the GridLayout and only the interpreter part
2021-05-11 14:59:57 +02:00
Olivier Goffart
e163794549
Fix panic when a non-element type is used as an element
2021-05-07 15:36:10 +02:00
Olivier Goffart
f620351cbf
Go to definition of structs
...
Also add the struct in the outline
2021-04-24 15:06:58 +02:00
Olivier Goffart
3f3a4c4ec9
Store the actual property declaration node
...
so that the goto definition can go to the right location
2021-04-18 14:19:38 +02:00
Olivier Goffart
87f4a363cf
Add support for opacity property
2021-04-15 15:05:09 +02:00
Olivier Goffart
e34b88d658
Fix panic in invalid export
2021-04-15 11:46:05 +02:00
Olivier Goffart
49477724c6
Fix panic when invalid property
2021-04-15 11:24:49 +02:00
Olivier Goffart
aeff269bd4
Fix another panic caused by some NamedReference of the layout not being visited
2021-04-14 17:23:33 +02:00
Olivier Goffart
11aff782de
Fix crash with drop-shadow in a repeater that contains layout
...
The layout are going to be optimized, and the optimized item's enclosing component
must be adjusted
2021-04-14 16:13:56 +02:00
Olivier Goffart
84e0b24550
Some refactoring of the syntax_nodes module
...
Ensure that the node always contains the write kind by panicking
if it doesn't.
Add some documentation for the macro that declares them
2021-04-14 11:46:49 +02:00
Simon Hausmann
c301cc22b5
Collect foreign imports and filter out true type fonts/collections
...
Resolve them early enough to produce good diagnostics. Permit true type
fonts & collections.
2021-04-14 09:17:23 +02:00
Simon Hausmann
cbf2b51670
Allow empty imports
...
Allow import "blah.60" or, more likely in the future, import "foo.ttf".
2021-04-14 09:01:49 +02:00
Olivier Goffart
7a65f31cc1
the source_file is not optional
2021-04-13 17:26:24 +02:00
Olivier Goffart
84501e630a
Rename SyntaxNodeWithSourceFile to SyntaxNode
...
Same for SyntaxToken
2021-04-13 17:10:56 +02:00
Olivier Goffart
a712f515fa
Make the viewport element of the flickable a real Element in the object_tree
2021-04-09 19:14:48 +02:00
Simon Hausmann
9a06a29314
Implement dynamic image-fit and aspect ratio behavior for Image elements
...
This is part of #168 where `image-fit` has dynamic defaults and missing
width or height property bindings are installed with an aspect ratio
preserving behavior.
2021-04-09 15:17:52 +02:00
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
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
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
Simon Hausmann
c771bcff45
Print a warning when trying to animate deprecated properties
2021-02-02 22:58:54 +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
e09fa06226
Fix nested for layouts
...
Fixes #149
2021-02-01 12:38:56 +01:00
Olivier Goffart
55fae15080
Debuging aid
2021-01-29 16:35:59 +01:00
Olivier Goffart
52d750999b
Pretty-print expression and better debug for Element
2021-01-28 14:36:16 +01:00