~eliasnaur/gio

4d4b3a627a236fcac2f8c51294796147c83ed5b1 — pierre 7 months ago 258033d
widget: fixed missing sides in Border

Signed-off-by: pierre <pierre.curto@gmail.com>
1 files changed, 4 insertions(+), 2 deletions(-)

M widget/border.go
M widget/border.go => widget/border.go +4 -2
@@ 21,12 21,14 @@ type Border struct {

func (b Border) Layout(gtx layout.Context, w layout.Widget) layout.Dimensions {
	dims := w(gtx)
	sz := dims.Size
	sz := layout.FPt(dims.Size)

	rr := float32(gtx.Px(b.CornerRadius))
	width := float32(gtx.Px(b.Width))
	sz.X -= width
	sz.Y -= width

	r := f32.Rectangle{Max: layout.FPt(sz)}
	r := f32.Rectangle{Max: sz}
	r = r.Add(f32.Point{X: width * 0.5, Y: width * 0.5})

	paint.FillShape(gtx.Ops,