Add feedback components 106-130; inert scope, focus return, two-step deploy
This commit is contained in:
87 files changed
+2492
-147
No files matched your search
+1
-1
@@ -14,7 +14,7 @@ type AspectBoxOptions struct {
|
||||
// AspectBox fills the width and keeps W:H in whole dots.
|
||||
func AspectBox(c *ui.Context, o AspectBoxOptions, children func()) *ui.Element {
|
||||
k := pixel.K(c)
|
||||
rw, rh := orDef("AspectBox W", o.W, 1), orDef("AspectBox H", o.H, 1)
|
||||
rw, rh := pixel.Or("AspectBox W", o.W, 1), pixel.Or("AspectBox H", o.H, 1)
|
||||
e := ui.Box(c).FillWidth().Clip()
|
||||
w, check := pixel.WrapWidth(c, e)
|
||||
return e.Height(k.D(w * rh / rw)).Draw(func(p *ui.Painter, r ui.Rect) { check(r) }).Children(children)
|
||||
|
||||
Reference in new issue
Block a user