mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
widget/material: adjust Button insets to match Android
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -89,7 +89,7 @@ func (b Button) Layout(gtx *layout.Context, button *widget.Button) {
|
|||||||
gtx.Constraints.Width.Min = hmin
|
gtx.Constraints.Width.Min = hmin
|
||||||
gtx.Constraints.Height.Min = vmin
|
gtx.Constraints.Height.Min = vmin
|
||||||
layout.Align(layout.Center).Layout(gtx, func() {
|
layout.Align(layout.Center).Layout(gtx, func() {
|
||||||
layout.UniformInset(unit.Dp(16)).Layout(gtx, func() {
|
layout.Inset{Top: unit.Dp(10), Bottom: unit.Dp(10), Left: unit.Dp(12), Right: unit.Dp(12)}.Layout(gtx, func() {
|
||||||
paint.ColorOp{Color: col}.Add(gtx.Ops)
|
paint.ColorOp{Color: col}.Add(gtx.Ops)
|
||||||
widget.Label{}.Layout(gtx, b.shaper, b.Font, b.Text)
|
widget.Label{}.Layout(gtx, b.shaper, b.Font, b.Text)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user