embedded-layout icon indicating copy to clipboard operation
embedded-layout copied to clipboard

Add a view wrapper (`Border<V>`?) compatibility struct that implements a box model

Open bugadani opened this issue 5 years ago • 1 comments

Would enable support for margin, padding and border. Most efficient would be to use different single-property structs (i.e. separate Margin), and implement extension methods for View objects.

i.e.:

let view = SomeView(...).border(1, BinaryColor::On); // view: Border<SomeView, BinaryColor>

This single wrapper approach only requires a single spacing property (only margin or only padding) as well as enables multiple borders.

bugadani avatar Mar 14 '21 08:03 bugadani

Would this better belong to a different crate?

bugadani avatar Mar 14 '21 08:03 bugadani