mirror of https://github.com/openclaw/openclaw.git
fix(macos): expand menu hover highlight width
This commit is contained in:
parent
9e32f29d19
commit
7daa93cf5a
|
|
@ -67,6 +67,7 @@
|
|||
- OAuth storage moved; legacy session syncing metadata removed.
|
||||
- Remote SSH tunnels now get health checks; Debug → Ports highlights unhealthy tunnels and offers Reset SSH tunnel.
|
||||
- Menu bar session/node sections no longer reflow while open, keeping hover highlights aligned.
|
||||
- Menu hover highlights now span the full width (including submenu arrows).
|
||||
|
||||
### Nodes & Canvas
|
||||
- Debug status overlay gated and toggleable on macOS/iOS/Android nodes.
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ final class HighlightedMenuItemHostView: NSView {
|
|||
|
||||
override func layout() {
|
||||
super.layout()
|
||||
self.updateTargetWidthFromWindow()
|
||||
self.hosting.frame = self.bounds
|
||||
}
|
||||
|
||||
|
|
@ -83,6 +84,18 @@ final class HighlightedMenuItemHostView: NSView {
|
|||
let size = self.hosting.fittingSize
|
||||
self.frame = NSRect(origin: .zero, size: NSSize(width: self.targetWidth, height: size.height))
|
||||
}
|
||||
|
||||
override func viewDidMoveToWindow() {
|
||||
super.viewDidMoveToWindow()
|
||||
self.updateTargetWidthFromWindow()
|
||||
}
|
||||
|
||||
private func updateTargetWidthFromWindow() {
|
||||
guard let width = self.window?.contentView?.bounds.width, width > 0 else { return }
|
||||
if abs(width - self.targetWidth) < 0.5 { return }
|
||||
self.targetWidth = width
|
||||
self.updateSizing()
|
||||
}
|
||||
}
|
||||
|
||||
struct MenuHostedHighlightedItem: NSViewRepresentable {
|
||||
|
|
|
|||
Loading…
Reference in New Issue