Conversation
|
For the record—and I understand this is subjective—I'm not a huge fan of the double closures API as it "feels out of place" (again subjective) relative to how other widgets work. My current half-baked view is that the ideal implementation would be one that modifies
I haven't explored a draft implementation yet but that's my current thinking in terms of what I've seen people need, what I'd like to have myself, and what I think would feel idiomatic for |
Could this be because there's not a lot of helpers/widgets that work with |
|
Could this maybe also be a helper function in the |
aspect_ratio helper for Responsiveaspect_ratio function for Size
|
Changed it to just a simple |
Co-authored-by: tigerros <tigerros@users.noreply.github.com>
Co-authored-by: tigerros <tigerros@users.noreply.github.com>
A newaspect_ratiofunction to create aResponsivewith a given ratio. More info in the doc and examples.A simple
aspect_ratiofunction forSize<f32>which returns a newSizethat satisfies the given aspect ratio within the bounds of the currentSizewhile being as large as possible.