In addition there were other changes like having all image loading, resampling and background fill generation done in a background thread and only drawn to screen when fully completed. This avoids some of the image tearing that was happening in earlier versions on slower hardware. Likewise, weather fetches and even date/time updates are done in their own threads. Each of these threads write new data to the run-time data model and then request for the screen to be updated. This gives a much smoother operation when multiple threads try to update the data model simultaneously. It also allows for the data model to be exposed to the layout engine.
Lets see some screenshots...
The interface is way more customisable now. Each of the widgets can be anchored to a corner, translated or even rotated.
The configuration for the widget layout is typically stored in layout.json, but can be configured to use any other file name, as long as it uses the expected JSON format. This is what the simple layout for the second screenshot looks like...
The format is straight forward and is described in more detail in the README.md file. However the gist of the above layout is there are two anchors set up, one for the bottom left corner and one for the bottom right corner. The bottom right anchor has one child node to display application branding. The other anchor has two text nodes, one is bound to the $time variable from the data model and the other is bound to the $date variable. Various transformations are applied to all of the text widgets (translation and rotation). All of the transformations are done relative to the widget origin, which is specified in the same way as an anchor - this allows easier positioning/snapping of a widget.
The main configuration file (config.properties) is now reduced in complexity and contains much fewer configuration parameters than it did before since the layout file takes over now.
The compiled version can be downloaded here: 0.4 Release Bundle.
I'll put together a more comprehensive article on how the new layout engine features can be used next week. I'll aim to cover anchors, origins, translation and rotation.