mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
widget/material: report icons dimensions after running Icon.Layout
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -40,6 +40,9 @@ func (ic *Icon) Layout(gtx *layout.Context, sz unit.Value) {
|
||||
Max: toPointF(ico.Size()),
|
||||
},
|
||||
}.Add(gtx.Ops)
|
||||
gtx.Dimensions = layout.Dimensions{
|
||||
Size: ico.Size(),
|
||||
}
|
||||
}
|
||||
|
||||
func (ic *Icon) image(sz int) paint.ImageOp {
|
||||
|
||||
Reference in New Issue
Block a user