Simon Hausmann
5dbd0b213c
Add support for grid layout padding
2020-08-28 15:06:14 +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
Simon Hausmann
4054402418
Fix layout info calculation for grid layouts
...
When the spacing was zero, the constraints would always be zero due to
accidental multiplication with the accumulated spacing widths/heights.
That was meant to be an addition.
2020-08-28 08:34:36 +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
479173c22f
Implement spacing in GridLayout
2020-08-05 15:42:38 +02:00
Simon Hausmann
0252d2ac34
Move slice out of abi
2020-08-03 17:41:16 +02:00
Simon Hausmann
30d7a0b36d
Move PathData and friends from datastructure to
...
graphics
2020-08-03 13:43:44 +02:00
Simon Hausmann
b05a11945e
Move datastructures::LayoutInfo into layout
2020-08-03 13:31:43 +02:00
Simon Hausmann
a2cec9e86f
Clean up LyonPathIterator API
...
* Remove Lyon from the name and instead call it PathDataIterator.
* Remove the fit() function and just provide two factory functions.
2020-08-03 13:18:38 +02:00
Simon Hausmann
c32114cee6
Add helper function to calculate the layout info for a grid layout
...
The minimum/maximum widths/heights are the sum of the cells.
2020-07-30 10:25:08 +02:00
Olivier Goffart
b57f3775c9
Refactor GridLayout
2020-07-28 10:31:05 +02:00
Simon Hausmann
00f2d384b2
Fix formatting
2020-07-24 07:52:18 +02:00
Olivier Goffart
debd2b5839
Smaller workaround for the fact that some function are not exported
2020-07-23 17:11:00 +02:00
Olivier Goffart
6c54dfb67d
Layout the item in a PathLayout if they are part of a repeater
2020-07-17 15:00:12 +02:00
Olivier Goffart
5e7d5369aa
Few fixes to the layout and add a test that the items are well positioned
2020-07-16 17:22:29 +02:00
Simon Hausmann
39359a4e26
Add support for an offset to PathLayout
...
This allows animating items on their position along the path.
2020-07-14 15:12:03 +02:00
Simon Hausmann
1845e495fe
Fix path layout positioning
...
The local parameter t on a path segment wasn't normalized to the length
of the segment itself.
2020-07-14 14:23:43 +02:00
Simon Hausmann
a3f365417c
Center items on a path layout
2020-07-14 09:43:59 +02:00
Simon Hausmann
1a0d053889
Align default path layout tolerance
...
Use the same tolerance as when rendering
2020-07-13 16:12:38 +02:00
Simon Hausmann
992f990fa8
Allow for fitting paths into a given bounding rectangle
...
... by applying a transformation. This allows designing a path in some
other path design tool and then make it fit using bindings.
2020-07-13 15:41:11 +02:00
Simon Hausmann
6243df1702
Avoid unnecessary path building
...
When the path was constructed from events (SVG commands), then we don't really need to build an intermediate path,
neither for rendering nor for path layouting.
2020-07-10 13:59:40 +02:00
Simon Hausmann
1f7ae1b318
Rename PathElements to PathData
...
as it can now consists of elements or events.
2020-07-10 13:01:05 +02:00
Simon Hausmann
1a70213c05
Fix path layout implementation to allow positioning
...
This is not exposed in the API yet though.
2020-07-09 15:38:26 +02:00
Simon Hausmann
8edb9bd7f8
Implement a layout function to position items on a path
...
This is very simple still, always starts at the beginning of the path
and uses equal distances.
2020-07-09 15:26:52 +02:00
Olivier Goffart
dd3097e23c
Fixup
2020-06-17 20:27:18 +02:00
Olivier Goffart
54f81d4d29
C++ Only link against the backend library
...
For some raison, not all symbols gets exported,
add some dummy code which seems to do the trick
2020-06-17 18:38:47 +02:00
Olivier Goffart
9c23326c60
Layout for the C++ as well
2020-06-10 19:41:24 +02:00
Olivier Goffart
96a372e45d
Grid layout in the interpreter
...
current imploementation is just a prototype
2020-06-10 19:40:47 +02:00
Olivier Goffart
88e904d228
Draft of the layouting runtime code
2020-05-11 15:33:38 +02:00