Skip to content

Commit 6ec5151

Browse files
authored
debugui: update InputCapturingStateHover calculation to support collapsed panels (#35)
Closes #34
1 parent 7d29b6e commit 6ec5151

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

context.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ func (c *Context) update(f func(ctx *Context) error) (inputCapturingState InputC
9696
// Check whether the cursor is on any of the root containers.
9797
pt := c.pointingPosition()
9898
for _, cnt := range c.rootContainers {
99-
if pt.In(cnt.layout.Bounds) {
99+
bounds := cnt.layout.Bounds
100+
if cnt.collapsed {
101+
bounds.Max.Y = cnt.layout.BodyBounds.Min.Y
102+
}
103+
if pt.In(bounds) {
100104
inputCapturingState |= InputCapturingStateHover
101105
}
102106
}

0 commit comments

Comments
 (0)