mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +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 {
|
func (a Alignment) String() string {
|
||||||
switch a {
|
switch a {
|
||||||
case Start:
|
case Start:
|
||||||
|
|||||||
Reference in New Issue
Block a user