Commit graph

747 commits

Author SHA1 Message Date
Olivier Goffart
0973cc7f86 Small changes to prnitdemo layout
Ideally we should convert to box layouts anyway
2020-10-27 09:02:22 +01:00
Olivier Goffart
aabd13b5a9 Adjust the ugly style default stretches 2020-10-27 07:24:04 +01:00
Olivier Goffart
47be71e16d Introduce layout stretching 2020-10-26 16:40:35 +01:00
Simon Hausmann
63a88ad452 Add smooth rounded borders to the fax page 2020-10-26 13:48:10 +01:00
Olivier Goffart
ed01d8369a Start working on VerticalLayout/HorizontalLayout 2020-10-23 14:08:58 +02:00
Simon Hausmann
0cb54b84f9 Remove dummy Rectangle from Gallery
It's not "needed" anymore AFAICS
2020-10-21 15:09:03 +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
f53997c155 Add the node examples to the examples README 2020-10-21 13:54:45 +02:00
Simon Hausmann
aad9306d54 Added a node version of the todo app 2020-10-21 13:49:18 +02:00
Olivier Goffart
b6655d0049 Add signal handler in the node printer demo 2020-10-21 12:44:12 +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
Olivier Goffart
47bf84d85d Printer demo: some logic for the Fax page 2020-10-20 15:06:24 +02:00
Simon Hausmann
67f3bbc767 Remove nodetest "example"
This stopped working when we removed cpptest, which provided the .60
file that was loaded.
2020-10-20 13:03:36 +02:00
Simon Hausmann
713cfd8157 Fix colspan/rowspan usage in todo demo
Accidental swap :-)
2020-10-20 10:52:02 +02:00
Simon Hausmann
41ad33f443 Fix bug in struct initialization from object literals
When converting from object literal to object literal, we would check
recursively if the individual fields can be converted and then generate
code to convert each field.

For a conversion frmo object literal to a struct, we would a per-field
can_convert check as well, but there would not be any code (Expression)
generated for the conversion, instead it would be a straight cast. That
was fine so far in our tests and example code, because the fields never
required a conversion. With commit
071ab9fda1 the percentage number literals
used in the printer demo however would now require a conversion
(multiplication by 0.01) before the assignment to the float level field.

This patch adds the missing conversion by matching the Object -> Struct
conversion case, generating an intermediate Object type based on the
struct's properties, call maybe_convert recursively and *then* cast the
result to a struct.
2020-10-19 12:17:41 +02:00
Simon Hausmann
c9e5e5f25b Fix appearance of ink levels in printer demo
Work around a regression introduced in commit 071ab9fda1 that
I'll try to fix next week.
2020-10-17 13:31:37 +02:00
Simon Hausmann
96ead1d028
One more relative length use in the printer demo 2020-10-16 22:11:45 +02:00
Simon Hausmann
cfe0fb396c Use percentages in the printer demo
Looks a little prettier in the source code :)
2020-10-16 20:32:35 +02:00
Olivier Goffart
cdc6a34eaf Support for array in JS 2020-10-16 12:58:27 +02:00
Olivier Goffart
e4e601de83 Draw the frame properly around the native scrollview 2020-10-16 10:45:17 +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
Simon Hausmann
9072d5423c Fix appearance of vertical scrollbar in listview in gallery
By default the listview had very many items that made the scrollbar look very very small.
2020-10-13 23:08:56 +02:00
John
d8a76aba7c Update printerdemo.60
Fixed alignment of the back arrow and the title
2020-10-13 21:36:58 +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
ed83fa7aa2 Fix the animation in the printer demo.
We don't want 'x' to depends from properties which are themself animated,
otherwise it just restarts the animation on every frames
2020-10-13 12:14:11 +02:00
Simon Hausmann
bc8fefd631 Use a dummy list view in the print page
Better than hello world :-)
2020-10-13 11:56:50 +02:00
Simon Hausmann
9f115ca004 printer demo: Use a layout for the copy page 2020-10-13 11:52:58 +02:00
Olivier Goffart
1138c9dbed Normalize the spelling of SixtyFPS 2020-10-13 07:48:55 +02:00
Simon Hausmann
a4745d911c Fix typo 2020-10-12 21:18:32 +02:00
Simon Hausmann
0752067cab
Fix appearance of the list view in the gallery
By default the window is a little too small (in terms of height), so the list view is squished. We don't propagate the minimum size to the window yet, so bump the height by hand.
2020-10-12 13:27:09 +02:00
Olivier Goffart
9d106c6830 Some changes in the README 2020-10-09 13:49:39 +02:00
Olivier Goffart
8fbfc3c4d7 Improve README 2020-10-09 13:39:40 +02:00
Olivier Goffart
119898f6d0 Remove the test examples 2020-10-08 17:18:22 +02:00
Olivier Goffart
2903428072 Add a C++ build of the gallery 2020-10-08 17:18:22 +02:00
Olivier Goffart
3bdd71b36f Start working on the Native ListView
Currently only the interpret part
2020-10-08 15:51:33 +02:00
Olivier Goffart
4bdf447b11 C++ build documentation and README 2020-10-08 12:25:12 +02:00
Simon Hausmann
d771143f68 Make it possible to exit the printer demo
... by clicking on the power button :-)

Calling exit is a big rough, but simplest and fastest for now.
2020-10-07 15:53:07 +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
Olivier Goffart
315fd7a881 Start doing a ScrollArea element
Unfortunately something is wrong with the Qt style, it looks like the Qt style
does not respect the rect given for the sub components

Also Input is not handled yet.
2020-09-22 20:05:41 +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