Olivier Goffart
1773f9143b
Add a border-radius property to the Clip
...
So that `clip: true` used on a Rectangle with border radius can be clipped
with that radius
Only the Qt backend is implemented for now
2021-04-12 19:47:18 +02:00
Olivier Goffart
aa9e9900e9
Add missing file
2021-04-12 19:23:39 +02:00
Olivier Goffart
533da0ea4c
Add missing file
2021-04-12 19:02:37 +02:00
Olivier Goffart
d762642323
Use the builtin name instead of the native name to identify some of the elements
2021-04-12 18:51:31 +02:00
Olivier Goffart
80b236489e
Add a clip
property that can be set to the Rectangle
2021-04-12 18:48:43 +02:00
Olivier Goffart
e67deebc76
Make rgb() and rgba() a macro that can take 3 or 4 arguments
...
and that accept both percent or integer
Closes #139
2021-04-12 15:19:15 +02:00
Olivier Goffart
ca64a540c4
Continue support for rgb() function
...
Fixup of previous commit which was part of https://github.com/sixtyfpsui/sixtyfps/pull/139
2021-04-12 15:18:25 +02:00
Seo Sanghyeon
0a76f40093
Add rgb function
2021-04-12 13:24:46 +02:00
Olivier Goffart
366ce83dae
Fix crash with repeater in a Flickable
2021-04-12 10:35:30 +02:00
Olivier Goffart
0c7a8fecb5
Forward the animation on the viewport properties to the viewport
...
Workaround for #193
2021-04-09 20:02:53 +02:00
Olivier Goffart
563866a60f
Remove debug assertion that is not always true
...
because Int32 and Float32 can be compared but aren't the same type
2021-04-09 19:28:32 +02:00
Olivier Goffart
b45190ca2d
Flickable geometry
...
Issue #192
2021-04-09 19:14:48 +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
Simon Hausmann
c448003e2f
Add test case for preferred size in boxes bug
...
Amends commit 7c1738eeea
This also adds the preferred-width/height fake properties to allow overriding.
2021-04-08 16:13:53 +02:00
Olivier Goffart
85986c39bd
Layouting: make the materialize fake layout property have an actual value
...
So that when we query it from the code, it has a value
2021-04-08 14:35:16 +02:00
Olivier Goffart
96ee9ea7a0
GridLayout: Element outside of a Row should go in a new row
2021-04-08 11:46:24 +02:00
Olivier Goffart
161a35ef5c
Fix completion when there are parse errors
...
The type registery still need to be set on the document
2021-04-08 09:05:48 +02:00
Olivier Goffart
81ebb2177e
LSP: completion of properties
2021-04-07 23:55:46 +02:00
Simon Hausmann
dca6f959cd
Fix C++ build of demos not rendering correctly
...
Call set_component only on the top-level app component, not on each repeated instance, etc.
2021-04-06 14:02:50 +02:00
Simon Hausmann
0e5ac6fbb8
Fix build of generated C++ code
...
Amend commit bd79bb6ac8
2021-04-06 13:58:33 +02:00
Simon Hausmann
bd79bb6ac8
Fix init order of generated C++ code
...
Like in commit 625eb733d3
for the
interpreter, call `set_component` on the Window before running the setup
code that might set the focus_item.
2021-04-06 13:42:15 +02:00
Olivier Goffart
4ce4dcb06b
Don't panic when a string literal contains a new line
2021-04-06 13:16:38 +02:00
Olivier Goffart
c3ab89dd3e
Refactor import opening and its hook
...
This way the hook is called regardless if the file exist in the import path or not
2021-04-06 12:27:59 +02:00
Olivier Goffart
4a79498761
Rename self_pinned to self_rc, that's a better name since _self is already pinned
2021-03-30 12:56:16 +02:00
Olivier Goffart
1b9ebda204
Rust generated code: Avoid using self_pinned when not needed
2021-03-30 12:55:10 +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
989e916e8c
Move NamedReference to its own module
2021-03-29 13:31:36 +02:00
Olivier Goffart
72f4827617
Fix message in assert not being a string literal
...
assert! does take a format string anyway so one need not to use format! as the
message of an assert. (That's better since then a string is not allocated when
the assert is going to succeed anyway
2021-03-25 17:08:15 +01:00
Olivier Goffart
cc619fd7d4
Fix reporting error without span
...
such as error from the interpreter that the file cannot be loaded
2021-03-24 11:12:38 +01:00
Olivier Goffart
68157724cc
No need to special case length casts for Expression::is_constant
...
Lenght cast lower to a FunctionCall which is not constant anyway
2021-03-23 13:22:49 +01:00
Simon Hausmann
4a9cd954b8
Rework the Rust entry point API for the interpreter
...
Switch to the stateful `ComponentCompiler` concept that we discussed for the C++ API.
2021-03-18 18:20:50 +01:00
Simon Hausmann
3391aa0312
Remove the import resolve callback from the compiler configuration
...
Re-apply commit 2dcbc45cd6
but now do the
resolution from a relative import path to either an absolute path or url
in the compiler itself.
2021-03-16 14:21:33 +01:00
Olivier Goffart
3db3400951
Rename the Object type to Struct in the compiler
2021-03-16 12:38:53 +01:00
Simon Hausmann
e3a33dffe0
Revert "Remove the import resolve callback from the compiler configuration"
...
This reverts commit 2dcbc45cd6
.
It breaks loading of the printer demo in the editor because in
import_file we fail to return the absolute path and thus end up
importing common.60 too many times.
2021-03-16 11:43:33 +01:00
Olivier Goffart
455693dbc0
Documentation for the interpreter crate
2021-03-16 11:24:02 +01:00
Simon Hausmann
2dcbc45cd6
Remove the import resolve callback from the compiler configuration
...
It turns out that this isn't really needed with the current
implementation.
2021-03-15 20:02:46 +01:00
Simon Hausmann
8372d3f6d8
Rename call_*
to invoke_*
for callbacks
...
Fixes #187
2021-03-15 17:01:05 +01:00
Simon Hausmann
b27034efa5
Rename sixtyfps::IntoWeak
into sixtyfps::ComponentHandle
and remove Clone
from generated components
...
`ComponentHandle` offers a richer API of common functions, such as
`show()`/`hide()` as well as the new `clone_strong()` - that should help
to prevent mistakely created strong reference that may cause leaks.
Fixes #188
2021-03-15 16:01:13 +01:00
Olivier Goffart
9676ed398d
Fix wasm build
2021-03-15 15:14:15 +01:00
Olivier Goffart
f1a7847820
Fixup syntax_tests
2021-03-15 12:41:10 +01:00
Olivier Goffart
a203097b88
Attempt to fix windows syntax_tests
...
Looks like the slashes were not canonical on Windows
2021-03-15 12:05:03 +01:00
Olivier Goffart
cae88f0823
Create a Diagnostic quen the main .60 file can't be loaded
2021-03-15 11:44:20 +01:00
Olivier Goffart
b2572f8bb3
Fix parser test macro
2021-03-15 10:50:33 +01:00
Simon Hausmann
70ff7baa85
Fix compilation after diagnostics API changes
2021-03-15 10:43:26 +01:00
Olivier Goffart
014e13b05f
Make Diagnostic field private
2021-03-15 10:37:24 +01:00
Olivier Goffart
730b1ccff2
Refactor diagnostic: Merge BuildDiagnostic and FileDiagnostic
2021-03-12 19:32:50 +01:00
Olivier Goffart
11e0be5130
Add the SourceLocation into the Diagnostic
2021-03-12 12:49:19 +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