Simon Hausmann
7047856d4e
Replace FooRc with Foo and without ComponentHandle in examples and tests
2020-12-03 08:13:24 +01:00
Simon Hausmann
08b8a8cb83
Port the examples away from the ComponentHandle based API
2020-12-03 08:13:15 +01:00
Simon Hausmann
a5932c9f88
Remove the outline around the canvas in the wasm demos
2020-11-26 17:31:46 +01:00
Olivier Goffart
d6a440aa4a
Change C++ API to use the ComponentHandle
2020-11-10 19:28:34 +01:00
Simon Hausmann
e87913634a
Use layout alignment
...
That allows removing a FIXME
2020-11-06 11:09:22 +01:00
Simon Hausmann
9df18a3747
Apply default layout spacing and padding from the style
...
Extract the StyleMetrics from the style and pass it to the layout
lowering pass for application.
The tests were adjusted to explicitly specify the padding/spacing to
override the ugly style default.
2020-11-04 15:20:43 +01:00
Olivier Goffart
72f22c8aad
Make a StyleMetrics global in the style and use it from todo just to test
2020-11-02 17:19:57 +01:00
Olivier Goffart
2ece3817cc
Make ModelHandle a struct
...
Last commit broke for structures containing models, because models are not PartialEq.
So we need to implement PartialEq for ModelHandle. Which means a struct needs to
be created
2020-10-31 13:32:19 +01:00
Simon Hausmann
cd75556ab1
Minor clean up in the todo app
...
* Show a placeholder text for the todo entry
* Disable the "Add Entry" button if there's nothing to be added
2020-10-30 15:55:19 +01:00
Olivier Goffart
263df7dc63
Remove the www from all sixtyfps.io URL
2020-10-29 11:06:06 +01:00
Olivier Goffart
d3801e26d3
Change the syntax of structures to require the struct keyword
2020-10-27 16:09:05 +01:00
Olivier Goffart
47be71e16d
Introduce layout stretching
2020-10-26 16:40:35 +01:00
Olivier Goffart
ed01d8369a
Start working on VerticalLayout/HorizontalLayout
2020-10-23 14:08:58 +02:00
Simon Hausmann
68e35ab332
Fix removing todo items in node
...
After removal the index is wrong and I mistakely thought entries() adjuts.
2020-10-21 14:18:33 +02:00
Simon Hausmann
aad9306d54
Added a node version of the todo app
2020-10-21 13:49:18 +02:00
Olivier Goffart
1436402999
Change the target name for the C++ example
...
they were ending by _cpp because corrosion used to add all rust target as target
but that's no longer the case
2020-10-20 18:02:28 +02:00
Simon Hausmann
713cfd8157
Fix colspan/rowspan usage in todo demo
...
Accidental swap :-)
2020-10-20 10:52:02 +02:00
Simon Hausmann
6aa292eac1
Change the names of the logical and physical pixel units
...
The logical pixels are now just called "px" and the less frequently
used physical pixels have the "phx" suffix.
The existing markup was adapted using the syntax updater and the
following patch:
+ if node.kind() == SyntaxKind::NumberLiteral {
+ if node.text().ends_with("lx") {
+ return write!(
+ file,
+ "{}px",
+ node.text().as_str().split_at(node.text().as_str().len() - 2).0
+ );
+ }
+ if node.text().ends_with("px") {
+ return write!(
+ file,
+ "{}phx",
+ node.text().as_str().split_at(node.text().as_str().len() - 2).0
+ );
+ }
+ }
Fixes #49
2020-10-16 07:19:40 +02:00
Olivier Goffart
87ec175166
wasm demo: Don't call non existing fuction
...
Fixes #85
2020-10-13 12:44:09 +02:00
Olivier Goffart
1138c9dbed
Normalize the spelling of SixtyFPS
2020-10-13 07:48:55 +02:00
Olivier Goffart
9d106c6830
Some changes in the README
2020-10-09 13:49:39 +02:00
Olivier Goffart
8b02568b4b
Refactor the cmake C++ build
2020-10-07 11:40:34 +02:00
Simon Hausmann
5695e251b7
Fix wasm builds
...
We're running into https://github.com/parcel-bundler/parcel/issues/1573
so switch back to webpack.
2020-10-05 11:29:40 +02:00
Olivier Goffart
c7e5b39973
Layout the items in the ListView
2020-10-02 18:07:39 +02:00
Olivier Goffart
f10c2bfd7c
More ListView WIP
2020-10-02 18:07:39 +02:00
Olivier Goffart
6d9af3449a
C++ model for the todo example in C++
2020-09-30 18:30:19 +02:00
Olivier Goffart
4cf61b5617
Make the "remove done items" button work in the Todo rust example
2020-09-30 17:57:19 +02:00
Olivier Goffart
6dd0d178a0
Rename ScrollArea to ScrollView
2020-09-28 10:52:29 +02:00
Olivier Goffart
5caeb601ff
Remove the accepted_text workaround now that we have the two way bindings
2020-09-25 16:47:24 +02:00
Olivier Goffart
8361ef4019
Start code egeneration for the two ways binding
...
This is only meant to include the cases in which the property are optimized.
Does not work yet for the dynamic component
2020-09-24 14:37:16 +02:00
Olivier Goffart
3f0d06b290
Use the ScrollArea in the todo example even if it is ugly
2020-09-22 20:11:43 +02:00
Simon Hausmann
b857eb4671
Add an accepted signal to TextInput and LineEdit
2020-09-21 13:18:53 +02:00
Simon Hausmann
93a08c5207
Add a LineEdit widget to the ugly and native style
2020-09-18 18:54:37 +02:00
Simon Hausmann
2da84fee46
Add a boilerplate TextInput item
2020-09-18 16:34:24 +02:00
Olivier Goffart
221bb853d7
Change the exaple to used named struct for models
2020-09-17 14:00:50 +02:00
Olivier Goffart
913d680333
Recactor rust Model after first round of API review
...
- Remove EmptyModel and use an Option
- Make ModelRc a type alias
- Rename ArrayModel into VecModel
2020-09-16 14:25:57 +02:00
Simon Hausmann
625cb6c6b8
Add a constructor to Text and let the color default to black
...
We really shouldn't require specifying a color for every Text {} element just in order
to see *some* text.
For Rectangle OTOH transparent is a good default (and thus for Color), hence
this change just to Text.
Right now the constructor bit is also a bit repetitive, this could
perhaps be folded into BuiltinItem to generate the ffi, default impl and
forward to an init function if it exists.
2020-09-16 08:20:13 +02:00
Simon Hausmann
a10cf5ca9a
Add WASM build for the todo app
...
This makes it easier to test text input also for the wasm build
2020-09-15 12:28:30 +02:00
Olivier Goffart
0d8a38577d
Todo example: make the "add todo" button do something
2020-09-14 16:38:45 +02:00
Simon Hausmann
fefa5b9cd4
Ignore the build directory
2020-09-08 22:34:29 +02:00
Olivier Goffart
e9b63552a7
Skeleton for a TODO app
2020-09-07 14:15:27 +02:00