mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 00:45:35 +00:00
ui: replace PushOp, PopOp with a StackOp
Before this change, there was no guarantee that a PopOp matched the intended PushOp. With a single stack operation, the client is forced to match pop with the right push. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+3
-2
@@ -104,10 +104,11 @@ func (s *Stack) Layout(children ...StackChild) Dimens {
|
||||
case SW, S, SE:
|
||||
p.Y = s.maxSZ.Y - sz.Y
|
||||
}
|
||||
ui.PushOp{}.Add(s.ops)
|
||||
var stack ui.StackOp
|
||||
stack.Push(s.ops)
|
||||
ui.TransformOp{Transform: ui.Offset(toPointF(p))}.Add(s.ops)
|
||||
ch.macro.Add(s.ops)
|
||||
ui.PopOp{}.Add(s.ops)
|
||||
stack.Pop()
|
||||
}
|
||||
b := s.baseline
|
||||
if b == 0 {
|
||||
|
||||
Reference in New Issue
Block a user