mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
widget: fixed missing sides in Border
Signed-off-by: pierre <pierre.curto@gmail.com>
This commit is contained in:
+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,
|
||||
|
||||
Reference in New Issue
Block a user