This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-05-02 22:49:52 +03:00
parent ec8c51b003
commit dd564815d4
14 changed files with 259 additions and 172 deletions

View File

@ -259,6 +259,7 @@ type ButtonStyle struct {
TextSize unit.Sp
Background color.NRGBA
CornerRadius unit.Dp
Height unit.Dp
Inset layout.Inset
}
@ -304,8 +305,9 @@ func IconButton(th *material.Theme, button *Clickable, icon *widget.Icon, descri
}
}
func (b Button) Layout(gtx layout.Context) layout.Dimensions {
func (b *Button) Layout(gtx layout.Context) layout.Dimensions {
min := gtx.Constraints.Min
min.Y = gtx.Dp(b.Height)
return b.Button.Layout(gtx, func(gtx layout.Context) layout.Dimensions {
semantic.Button.Add(gtx.Ops)
return layout.Background{}.Layout(gtx,