mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 00:45:35 +00:00
ui/layout: rename and sanitize enums
Rename MainAxisAlignment to Spacing and CrossAxisAlignment to just Alignment. Drop the untyped Start, End, Center values and add them as Spacing and Direction values. Center is both a Direction and Alignment, so use the synonym "Middle" for the alignment. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -25,19 +25,6 @@ type StackChild struct {
|
||||
dims Dimens
|
||||
}
|
||||
|
||||
type Direction uint8
|
||||
|
||||
const (
|
||||
NW Direction = iota
|
||||
N
|
||||
NE
|
||||
E
|
||||
SE
|
||||
S
|
||||
SW
|
||||
W
|
||||
)
|
||||
|
||||
func (s *Stack) Init(ops *ui.Ops, cs Constraints) *Stack {
|
||||
s.ops = ops
|
||||
s.cs = cs
|
||||
|
||||
Reference in New Issue
Block a user