mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
@@ -194,6 +194,20 @@ func (d Direction) Layout(gtx Context, w Widget) Dimensions {
|
||||
}
|
||||
}
|
||||
|
||||
// Spacer adds space between widgets.
|
||||
type Spacer struct {
|
||||
Width, Height unit.Value
|
||||
}
|
||||
|
||||
func (s Spacer) Layout(gtx Context) Dimensions {
|
||||
return Dimensions{
|
||||
Size: image.Point{
|
||||
X: gtx.Px(s.Width),
|
||||
Y: gtx.Px(s.Height),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (a Alignment) String() string {
|
||||
switch a {
|
||||
case Start:
|
||||
|
||||
Reference in New Issue
Block a user