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
Olivier Goffart
07df517473
Replace $children
with @children
2021-01-28 11:55:08 +01:00
Olivier Goffart
9aca0b0a7e
LSP: Allow to access to the type loader documents
...
So that we can go to the definition of un-open documents
2020-12-28 12:48:32 +01:00
Olivier Goffart
7fcb49bef1
Implement Go to definition for elements
2020-12-23 15:15:53 +01:00
Olivier Goffart
0d2d48be4f
Rename "signal" to "callback"
2020-12-18 09:51:01 +01:00
Olivier Goffart
7f78bea8b5
Fix a bunch of cargo clippy warnings in the compiler
2020-12-07 12:54:38 +01:00
Olivier Goffart
ac3ce779e9
Make child_of_layout actually mean what it is named after
2020-12-02 18:36:23 +01:00
Olivier Goffart
276e11a101
More work on signals with return value
2020-12-01 18:47:49 +01:00
Olivier Goffart
7bfa998f00
Popup positioning
2020-11-30 18:39:41 +01:00
Olivier Goffart
f3d6ce1695
Fix visit_all_named_references once more
...
We must visit the layout of every component we see, including the ones
for the popups
2020-11-30 15:20:51 +01:00
Olivier Goffart
957867d72a
More work on popup
2020-11-30 15:20:51 +01:00
Olivier Goffart
852eeb1c11
WIP popup
2020-11-30 15:20:51 +01:00
Olivier Goffart
5f93f88b77
Adjust the text of the error message when a property has a non-property type
2020-11-30 13:35:52 +01:00
Olivier Goffart
a4c538c615
Throw an error when using an element as a property type
...
We currently do not support that
2020-11-30 13:31:02 +01:00
Olivier Goffart
f1d61eb1c3
Fix the no_borrow visitor so they actually do not borrow
2020-11-26 17:16:21 +01:00
Olivier Goffart
2245df7b14
Add a function to visit all expression within a component
2020-11-26 17:15:45 +01:00