This PR implements a simple Stack widget that can be used to display elements on top of each other.
The Stack uses the first element as its base layer and every consecutive element is displayed on top of the previous one. The base element defines the intrinsic size of the Stack, so the elements on top can easily position themselves using other existing widgets (e.g. container).
Like column and row, it comes with both its function and macro helpers.
The bezier_tool example showcases how we can use this new widget to show the "Clear" button at the top right corner of the Canvas:
This PR implements a simple
Stack
widget that can be used to display elements on top of each other.The
Stack
uses the first element as its base layer and every consecutive element is displayed on top of the previous one. The base element defines the intrinsic size of theStack
, so the elements on top can easily position themselves using other existing widgets (e.g.container
).Like
column
androw
, it comes with both its function and macro helpers.The
bezier_tool
example showcases how we can use this new widget to show the "Clear" button at the top right corner of theCanvas
:This produces (amazing art not included!):