mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +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()),
|
Max: toPointF(ico.Size()),
|
||||||
},
|
},
|
||||||
}.Add(gtx.Ops)
|
}.Add(gtx.Ops)
|
||||||
|
gtx.Dimensions = layout.Dimensions{
|
||||||
|
Size: ico.Size(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ic *Icon) image(sz int) paint.ImageOp {
|
func (ic *Icon) image(sz int) paint.ImageOp {
|
||||||
|
|||||||
Reference in New Issue
Block a user