Compare commits
No commits in common. "43d49a0dbb276bd1806e172132b24174d5187292" and "cdc999ad429c5b30fdfe180611d32da4fdeb753c" have entirely different histories.
43d49a0dbb
...
cdc999ad42
@ -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 := range o.order {
|
for overlay, visible := range o.visible {
|
||||||
if o.visible[overlay] {
|
if visible {
|
||||||
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 := range o.order {
|
for overlay, visible := range o.visible {
|
||||||
if o.visible[overlay] {
|
if visible {
|
||||||
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, geom.PtF32(s.Width.Zero(size.X), s.Height.Zero(size.Y)))
|
var content = s.Proxy.DesiredSize(ctx, size)
|
||||||
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