Simon Hausmann
0f1b1fd0db
Fix initial value of the scale factor window property
...
We need to initialize it property once we have a platform window.
2020-08-05 10:49:53 +02:00
Olivier Goffart
2dc1ef088e
Compile
2020-08-05 10:36:41 +02:00
Simon Hausmann
d3c596669c
Add larger icons to the printer demo
...
The icons on the main screen are now nicely large and they scale down on
activation.
2020-08-05 10:04:11 +02:00
Simon Hausmann
48df8d0911
Rework the API between the items and the renderer
...
Move fields out of the HighLevelRenderingPrimitive that are suitable to
represent as uniform variables. That reduces fields like Image or
Rectangle to their image or dimension, and only if *they* change, then
we re-do the work of building geometry and uploading it to the GPU.
Instead, the typically animated properties such as the position or the
color are passed separately with each draw call. This avoids re-decoding
PNG files and uploading them again when moving an image element around
on the screen.
2020-08-05 09:44:12 +02:00
Simon Hausmann
a9297af00d
Update the rendering primitives lazily using a property listener scope
...
This also allows avoiding the need to store the high-level rendering
primitive item in the low-level primitive struct for comparison later.
2020-08-04 22:48:03 +02:00
Olivier Goffart
2518af41b1
Fix for
in a declared component
2020-08-04 18:51:39 +02:00
Olivier Goffart
c9fab854e3
Some tweek in the animation
2020-08-04 18:18:55 +02:00
Olivier Goffart
0199b70cea
if
statements
2020-08-04 17:36:20 +02:00
Simon Hausmann
504b4a327b
Provide the svg source for the image and a conversion script
2020-08-04 17:22:55 +02:00
Simon Hausmann
685a3fb8ab
Rename Text::font_pixel_size to just font_size
...
Since length are resolution independent, it doesn't make sense anymore
to have the pixel infix.
2020-08-04 16:56:42 +02:00
Simon Hausmann
2b713eb341
Use a default font size that scales with the window scale factor
...
This is still coded in the backend but eventually we'll have default values
properties of items and then that can go there.
2020-08-04 16:53:48 +02:00
Simon Hausmann
4aed6ac6f3
Small touch-up on the rectangles
2020-08-04 16:37:10 +02:00
Simon Hausmann
67feaed237
Ignore a potential build directory
2020-08-04 16:09:33 +02:00
Simon Hausmann
254df328d0
Add support for images (resources) in models
...
This also allows replacing the emojis (not working due to lack of fallback) with images
2020-08-04 16:09:33 +02:00
Olivier Goffart
283387bc44
Add the self and parent implicit id
2020-08-04 15:58:40 +02:00
Simon Hausmann
ee3765e115
Print out the type we failed to convert to rust if it happens
2020-08-04 15:10:58 +02:00
Simon Hausmann
7277d15394
Provide a better error message when failing to convert a type to C++
2020-08-04 15:04:18 +02:00
Simon Hausmann
2d255380c7
Don't crash when trying to report internal errors
2020-08-04 15:01:42 +02:00
Simon Hausmann
71a1daaf5a
Don't crash if we can't find the unicode replacement character
...
Fall back to a question mark :-)
2020-08-04 14:28:45 +02:00
Olivier Goffart
8c793c81e9
Implement some transition between pages
2020-08-04 14:13:22 +02:00
Olivier Goffart
52cf481dc4
Fix states in repeated elements
...
This create reference to new property that needs to be adjusted
2020-08-04 14:02:18 +02:00
Olivier Goffart
894d44e3ac
Correctly print syntax errors in the viewer
...
(instead of panicking because of invalid synstax_node invariant)
2020-08-04 12:59:49 +02:00
Olivier Goffart
2d04e47230
Remove stray dbg
2020-08-04 12:59:49 +02:00
Simon Hausmann
41671e3efb
Represent the window scale factor conversions in the IR
...
That means less code in the generators and easier to extend in the
future with more built-in functions.
2020-08-04 12:49:37 +02:00
Olivier Goffart
1d0eacc87f
Fix wasm build
2020-08-04 12:22:40 +02:00
Olivier Goffart
d158690a88
Add some buttons for the printer demo
2020-08-04 12:19:32 +02:00
Olivier Goffart
01a626cf49
Fix panic when the glyph do not exist in the font
...
This happen with emoji.
Show a replacement character (�) instead
2020-08-04 12:18:30 +02:00
Olivier Goffart
0b1648d891
Fix formating
2020-08-04 11:52:47 +02:00
Olivier Goffart
2b9e529af7
Fix unicode in strings in C++
2020-08-04 11:52:47 +02:00
Olivier Goffart
f09cbdb9ef
Update rust.yaml
2020-08-04 11:21:54 +02:00
Olivier Goffart
59a198b213
Create a top level CMakeLists.txt
...
Also disable Qt for now in the CI as this does not currently build
because of a bug in aho-corasick
2020-08-04 11:16:50 +02:00
Olivier Goffart
3becd69bc5
Skeleton for the printerdemo
2020-08-04 10:11:02 +02:00
Olivier Goffart
e4cd21efd6
Compile
2020-08-04 10:00:05 +02:00
Simon Hausmann
4f0bf0b982
Rename dpi to (window) scale_factor
2020-08-04 09:01:30 +02:00
Simon Hausmann
57154a7467
Oops, fix build
2020-08-04 08:33:50 +02:00
Simon Hausmann
df4e837b04
Move model placeholder module out of abi
2020-08-04 08:27:34 +02:00
Simon Hausmann
f79b80f1e6
Split corelib::abi::sharedarray into corelib::sharedarray and corelib::sharedarray::ffi
2020-08-04 08:26:44 +02:00
Simon Hausmann
3ad7a55038
Split corelib::abi::signals into corelib::signals and corelib::signals:ffi
2020-08-04 08:24:04 +02:00
Olivier Goffart
d7bb993d7b
Fix clang warnings
2020-08-03 18:46:11 +02:00
Olivier Goffart
b9088aa178
Fix linking of C++ code
2020-08-03 18:45:25 +02:00
Olivier Goffart
da11b33e9b
Version check
...
Compilation error when the compiler and the runtime are not on the same version
2020-08-03 18:44:36 +02:00
Simon Hausmann
37f874a26b
Rename test_ellapse_time to mock_elapsed_time
2020-08-03 17:52:42 +02:00
Simon Hausmann
f2166d91a6
Move tests out of abi
2020-08-03 17:48:17 +02:00
Simon Hausmann
dbd6708959
Move string out of abi
...
And split the FFI-only bits into an ffi submodule.
2020-08-03 17:44:49 +02:00
Simon Hausmann
0252d2ac34
Move slice out of abi
2020-08-03 17:41:16 +02:00
Simon Hausmann
9b13b363c3
Move corelib::abi::properties to corelib::properties
...
And the bits that are only there for the C binding are now in an ffi sub-module.
2020-08-03 17:32:28 +02:00
Olivier Goffart
b259a09338
Rename the types float32 and int32 to float and int
2020-08-03 16:15:41 +02:00
Olivier Goffart
1bfd708784
Change the field_offsets() function to a FIELD_OFFSETS associated const
2020-08-03 16:04:55 +02:00
Olivier Goffart
de188e0a54
Add the as_weak to rust generated component
2020-08-03 15:36:54 +02:00
Simon Hausmann
785bdb62ed
Fix linking on Linux
2020-08-03 15:35:19 +02:00