Skip to content

Commit

Permalink
fix image scaling
Browse files Browse the repository at this point in the history
On platforms with different pixel density the avatar may not render the
same as when laid out on the contact list. This fixes this
inconsistency.
  • Loading branch information
mixmasala committed Oct 18, 2022
1 parent 2f27aa3 commit 015660c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (c *Contactal) Layout(gtx C) D {

gtx.Constraints = layout.Exact(gtx.Constraints.Constrain(sz))
i := c.Render(sz)
return widget.Image{Scale: float32(1), Src: paint.NewImageOp(i)}.Layout(gtx)
return widget.Image{Fit: widget.Contain, Src: paint.NewImageOp(i)}.Layout(gtx)
})
})
}
Expand Down

0 comments on commit 015660c

Please sign in to comment.