Commit graph

14 commits

Author SHA1 Message Date
Olivier Goffart
d924ec6bd9 Fix a bug when using layout within a for loop 2020-09-07 14:03:46 +02:00
Simon Hausmann
7976a4057f Improve handling of nested layouts
We support directly nested layouts, but we did not support indirect
nesting:

    GridLayout {
        Rectangle {
            l2 := GridLayout { ... }
        }
    }

This patch fixes that by detecting this scenario and merging the layout
info of the element (Rectangle) and the layout inside (l2). This makes
it much easier to create re-usable components that use layouts
themselves and allows placing them in layouts.
2020-08-28 15:06:14 +02:00
Olivier Goffart
58cdaeb8dd Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
Simon Hausmann
2823f32692 Apply license headers to all non-binary/non-json sources 2020-08-17 17:55:20 +02:00
Olivier Goffart
2518af41b1 Fix for in a declared component 2020-08-04 18:51:39 +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
c0fab1c3e9 More progress in states and transition parsing
Fill the object_tree with states, and part of the transition

Also make sure to duplicate animations properly in inlining
2020-07-20 15:04:06 +02:00
Simon Hausmann
c8a649c09c Remove unused diagnostics parameter 2020-07-20 08:57:15 +02:00
Simon Hausmann
e914715d88 Rename Diagnostics to FileDiagnostics
As this structure holds the diagnostics just for one file.
2020-07-16 18:25:42 +02:00
Olivier Goffart
20369c7fc7 Fix nested components 2020-07-03 14:04:51 +02:00
Simon Hausmann
ab697ab71d Parse animation declarations into the object tree
So

    animate x { ... }

is basically a short-hand for

    PropertyAnimation {
        ...
    }

    <magically associated that animation with x whenever x is changed>

We could also support a shared animation syntax in the future:

    blah := PropertyAnimation { ... }

    animate x with blah;
    animate y with blah;

This patch also adds a primitive PropertyAnimation struct, which will be
used by the generated code to collect the values specified in the .60
markup.
2020-06-24 17:43:48 +02:00
Olivier Goffart
d7fe69ff74 Lookup the index from a repeater expression 2020-06-16 17:23:38 +02:00
Olivier Goffart
56aad7f474 Fix looking up of 'id' so that we can't access inaccessible id 2020-06-16 16:04:38 +02:00
Olivier Goffart
c940e8d734 Add missing files 2020-06-16 14:11:26 +02:00