- Updated macros
LinearLayout
now implementsViewGroup
LinearLayout::inner{_mut}
LinearLayout::arrange_view_group
Orientation::compute_offset
ViewGroup::bounds_of
ViewGroup::translate_child
Orientation::place
now returns the bounds of the placed View.
ViewGroup
macro can now be used on enumsViewGroup
macro now supports empty enum variants and unit structsLinearLayout
can now be used in macro-generated view groups
embedded-layout
no longer panicks when accessing an out-of-bounds view in aViewGroup
- Fixed aligning to a 0-sized reference object
- Update
embedded-layout-macros
crate dependency - Re-export the
ViewGroup
derive macro
- (breaking) Update to
embedded-graphics
0.8 - (breaking) Bump Minimum Supported Rust Version (MSRV) to 1.61.
- Add
chain!
macro to simplify working with object chains - Include object chain types in
prelude
View::translate_mut
derive(ViewGroup)
to easily implmenet ViewGroup on a structure with named fields.view_group::Views
which can wrap a slice of View objects into a ViewGroup.LinearLayout::into_inner()
LinearLayout
now has a position.
- breaking Update to
embedded-graphics
0.7 - breaking Changed
ViewGroup
to a trait. Layouts now operate on objects that implementViewGroup
. - breaking LinearLayout now requires a view in their constructors.
- breaking Changed
View::translate
to take ownership and return ownership instead of working with references - Changed
Link
to be public. Replaced privateGuard
with publicChain
which now wraps an object. - breaking Empty object chains are no longer possible.
- breaking Renamed
ChainElement::count()
toChainElement::len()
for consistency.
- Removed the
ChainElement
trait fromprelude
. - Removed
embedded-graphics
types fromprelude
. - Removed most methods of
RectExt
. - Removed
DisplayArea
extension trait.
ElementSpacing
forLinearLayout
: distribute views in a given space or place them at a set distance from one another- Example that shows how to create custom views (
examples/custom_view.rs
)
- The
align
module is now public - Secondary alignment implementations now require specifying the alignment of the first view
- Changed what is re-exported from the
embedded-graphics
prelude. This reduces function name collisions - breaking: Renamed
layout_direction::LayoutDirection
toorientation::Orientation
- breaking: Renamed
layout_operation::LayoutOperation
tolayout_element::LayoutElement
- breaking:
ViewLink
has been renamed toLink
andChainTerminator
toGuard
- Fixed an issue with cascading alignments in
LinearLayout
View
traitViewGroup
struct to allow working with multiple viewsLinearLayout
to arrangeView
s sequentially along the horizontal or vertical axis
- breaking: Change API to work with a reference to the reference box
- Initial release
- New alignments:
TopToBottom
,BottomToTop
,LeftToRight
,RightToLeft
- New method:
align_to_mut
to apply an alignment to a reference
- Usability improvement: alignment mode objects can now be passed by value
- Initial release