Simon Hausmann
f853843bc4
Store layouts in a common enum and vector
...
That'll make it easier later to allow for nesting them.
2020-07-29 18:52:02 +02:00
Simon Hausmann
89648a8146
Automate the test case for the grid layout
2020-07-29 18:51:26 +02:00
Olivier Goffart
edd9575b53
Add easing curve in the C++ backend
2020-07-29 15:29:55 +02:00
Olivier Goffart
46a011683f
Implement easing curve in the runtime
2020-07-29 15:20:28 +02:00
Olivier Goffart
feec73674f
Start implementing easing curve
2020-07-29 15:19:41 +02:00
Simon Hausmann
033a1be207
Bump font-kit
2020-07-28 23:03:18 +02:00
Olivier Goffart
733f44f50b
Error when using a layout property outside of a layout
2020-07-28 18:24:36 +02:00
Olivier Goffart
5b2add75e4
Parse the row/col/rowspan/colspan in a layout
2020-07-28 18:04:16 +02:00
Olivier Goffart
f02512f467
Allow to get the span of a binding
2020-07-28 18:02:23 +02:00
Simon Hausmann
c847a7b924
Fix values of width/height properties on initial show on macOS
2020-07-28 14:45:17 +02:00
Simon Hausmann
893124d64e
Minor cleanup in glyph cache code
...
Merge string_to_glyphs and layout_glyphs -- they only make sense together here.
2020-07-28 14:22:34 +02:00
Simon Hausmann
cd77171bbc
Move all glyph cache related code into one module
2020-07-28 14:22:34 +02:00
Simon Hausmann
c102fca828
Move the glyph rasterization code into the new font module in corelib
2020-07-28 14:22:34 +02:00
Olivier Goffart
604359f01f
Put the gallery in a layout
2020-07-28 10:44:17 +02:00
Olivier Goffart
96a2efcb93
Only recompute the layout when needed
2020-07-28 10:43:06 +02:00
Olivier Goffart
b57f3775c9
Refactor GridLayout
2020-07-28 10:31:05 +02:00
Olivier Goffart
0a722c86b3
Implement layouting_info for everything
2020-07-28 10:31:05 +02:00
Simon Hausmann
4d645dd9a3
Remove fake string_to_glyphs implementation for canvas text
...
We don't need it
2020-07-28 09:39:31 +02:00
Simon Hausmann
c88a4c44ab
Minor cleanup in fontkit code
...
I think I've found the right placement of lifetime specifiers to fix
string_to_glyphs() to return an iterator instead of allocating a vector :-)
2020-07-28 09:32:18 +02:00
Simon Hausmann
b69afa88d7
Minor cleanup in font handling
...
The mutability of the font cache should be an implementation detail. Makes the API easier :)
2020-07-28 09:28:43 +02:00
Simon Hausmann
09cae799d3
Fix return type of compile_syntax_node
...
All call sites are only interested in the root component, so might
as well return that.
2020-07-28 09:21:32 +02:00
Simon Hausmann
2425c366db
Fix build without Qt, part 2
...
A really clean build still brough up the issue that the C++ code was failing to build.
Instead, guard those places with #cfg just in the style crate and provide
"empty" items otherwise. That also simplifies the usage site again.
This time tested with git clean -fdx :-)
2020-07-28 08:58:13 +02:00
Simon Hausmann
8a2ff4fd5f
Provide a basic implementation of layout_info for Text
...
This also starts moving the rendering independent part of the font handling
to corelib. The next step will be to adapt the rendering code to use that
instead of its own.
2020-07-27 21:36:58 +02:00
Simon Hausmann
b07f577aa4
Fix build without Qt
...
If we can't find qmake, don't use the qt_style crate
2020-07-27 15:26:13 +02:00
Olivier Goffart
def42ba3df
Add reserved properties that every item has
...
These properties are materialized if used
2020-07-27 12:18:55 +02:00
Simon Hausmann
a4938c4d8e
Add wasm boilerplate
2020-07-25 17:34:59 +02:00
Olivier Goffart
2739ce1e19
CI: Set the LD_LIBRARY_PATH
2020-07-25 15:58:04 +02:00
Simon Hausmann
7dc192a509
Prospective fix for qt in the CI
2020-07-24 21:00:36 +02:00
Simon Hausmann
7aa7bd8492
Add support for exporting imports
...
This will allow us to break up the styles, so that one can have for example
button.60
checkbox.60
and finally widgets.60:
import { Button } from "button.60";
import { CheckBox } from "checkbox.60";
export { Button, CheckBox };
and then the users have to only import "widgets.60";
2020-07-24 18:33:01 +02:00
Olivier Goffart
d77d7cddc3
The viewer can use the Qt style with --style qt
2020-07-24 18:06:55 +02:00
Olivier Goffart
b8299747c6
WIP: some draft of a Qt style
2020-07-24 17:59:23 +02:00
Simon Hausmann
46d6e84754
Removed invalid comment
...
The issue was first earlier today (first commit :-)
2020-07-24 17:50:32 +02:00
Simon Hausmann
88fb491837
Add support for mapping elements to different native classes
...
The Rectangle element has properties for a border outline. If those are
used, then the generated code should use BorderRectangle. But if they are
not used, then we can fall back to just generating a Rectangle.
2020-07-24 17:48:19 +02:00
Simon Hausmann
6c27451761
Begin separating builtin elements from the underlying types
...
This uses a NativeClass type in the registry to represent the underlying
Rust/C++ types.
2020-07-24 16:11:46 +02:00
Simon Hausmann
0c5b0fbabd
Don't require a border width to make a rounded rect
2020-07-24 14:54:49 +02:00
Simon Hausmann
b3ff744edf
Fix rendering of the bubble inside the checkbox
2020-07-24 14:48:03 +02:00
Simon Hausmann
016834ad91
Don't fill a rectangle beyond its outline
2020-07-24 14:25:37 +02:00
Olivier Goffart
d3ad4603c8
A dummy checkbox
2020-07-24 11:56:54 +02:00
Olivier Goffart
f87a3e2c13
Assignment operator
2020-07-24 11:43:23 +02:00
Olivier Goffart
6f30c21a98
Fix panic when connecting a non existing signal
2020-07-24 11:33:00 +02:00
Olivier Goffart
232848de9e
Make sure that there is only one error reported when assigning to invalid
...
This also start parsing assignment ('=') as a self assignement
but the code generation is not yet implmented
2020-07-24 11:33:00 +02:00
Simon Hausmann
389c2ab3cd
Fix build of C++ tests
2020-07-24 11:08:40 +02:00
Simon Hausmann
424f74a506
Minor style tweak
...
Use collect() instead of the explicit from_iter call. A little neater :-)
2020-07-24 10:49:17 +02:00
Simon Hausmann
a03e0dc5d6
Fix gallery.60 in the interpreter
...
Forgot to collect RTTI for BorderRectangle :-)
2020-07-24 10:34:27 +02:00
Simon Hausmann
9938197b58
Split Rectangle again
...
Into the previous Rectangle and BorderRectangle that allows (rounded) borders through a stroke in addition to the fill.
Next step is to make the compiler make the choice automatically depending
on the properties used.
2020-07-24 10:15:12 +02:00
Simon Hausmann
0a24fbd56d
Reduce some code duplication in the renderer
2020-07-24 09:28:02 +02:00
Simon Hausmann
dd9bd2cf72
Add a rounded border to the button
...
There's still an open question about how to avoid the border properties
for all rectangles but allocate them only for those who have a border.
Regardless, this border illustrates the issue with the lack of text sizing.
2020-07-24 09:21:30 +02:00
Simon Hausmann
c1a946e949
Replace the layout in the gallery with fixed sizes
...
There's an issue with the width applied by the layout, so remove it for
now and re-add later.
2020-07-24 08:41:11 +02:00
Simon Hausmann
267f7caa90
Fix a bug with accessing declared and moved properties from within bindings
...
In commit 46ca98b159
the binding fixup was moved
to be applied later, but at that point the bindings have been
moved and aren't there (on the element) anymore, so they'd
never get fixed. This patch moves the fixup back up again.
2020-07-24 08:17:12 +02:00
Simon Hausmann
00f2d384b2
Fix formatting
2020-07-24 07:52:18 +02:00