Compare commits
2 Commits
cdc999ad42
...
43d49a0dbb
Author | SHA1 | Date | |
---|---|---|---|
43d49a0dbb | |||
352984d6d9 |
@ -75,8 +75,8 @@ func (o *Overlays) Arrange(ctx Context, bounds geom.RectangleF32, offset geom.Po
|
|||||||
|
|
||||||
func (o *Overlays) Handle(ctx Context, e Event) bool {
|
func (o *Overlays) Handle(ctx Context, e Event) bool {
|
||||||
var handled bool
|
var handled bool
|
||||||
for overlay, visible := range o.visible {
|
for _, overlay := range o.order {
|
||||||
if visible {
|
if o.visible[overlay] {
|
||||||
if o.overlays[overlay].Handle(ctx, e) { // handle all overlays regardless of return value
|
if o.overlays[overlay].Handle(ctx, e) { // handle all overlays regardless of return value
|
||||||
handled = true
|
handled = true
|
||||||
}
|
}
|
||||||
@ -92,8 +92,8 @@ func (o *Overlays) Hide(name string) { o.SetVisibility(name, false) }
|
|||||||
|
|
||||||
func (o *Overlays) Render(ctx Context) {
|
func (o *Overlays) Render(ctx Context) {
|
||||||
o.Proxy.Render(ctx)
|
o.Proxy.Render(ctx)
|
||||||
for overlay, visible := range o.visible {
|
for _, overlay := range o.order {
|
||||||
if visible {
|
if o.visible[overlay] {
|
||||||
o.overlays[overlay].Render(ctx)
|
o.overlays[overlay].Render(ctx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ func (s *Spacing) Center() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Spacing) DesiredSize(ctx Context, size geom.PointF32) geom.PointF32 {
|
func (s *Spacing) DesiredSize(ctx Context, size geom.PointF32) geom.PointF32 {
|
||||||
var content = s.Proxy.DesiredSize(ctx, size)
|
var content = s.Proxy.DesiredSize(ctx, geom.PtF32(s.Width.Zero(size.X), s.Height.Zero(size.Y)))
|
||||||
var w, h = s.Width.Zero(content.X), s.Height.Zero(content.Y)
|
var w, h = s.Width.Zero(content.X), s.Height.Zero(content.Y)
|
||||||
var margin = func(l *Length) float32 {
|
var margin = func(l *Length) float32 {
|
||||||
var v = l.Value()
|
var v = l.Value()
|
||||||
|
Loading…
Reference in New Issue
Block a user