kas-gui / kas

Another GUI toolkit
Apache License 2.0
892 stars 27 forks source link

Replace align!, pack!, margins! with adapters #438

Closed dhardy closed 5 months ago

dhardy commented 5 months ago

Remove widget aliases StrLabel, StringLabel, StrText, StringText.

Replace align!(spec DSL, child), pack!(spec DSL, child) and margins!(spec DSL, child) with .align(hints), .pack(hints), .margins(dirs, style) widget/layout adapters (these work both within layout syntax and without).

More AlignHints constants (TOP, TOP_LEFT, etc.).

Support .map_any() on layout macro objects. This is a hack, but hides one of the most obvious differences between layout syntax objects and real widgets.

Various improvements to proc-macros, especially make_layout.rs.