fix(macos): expand menu hover highlight width
This commit is contained in:
@@ -67,6 +67,7 @@
|
|||||||
- OAuth storage moved; legacy session syncing metadata removed.
|
- 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.
|
- 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 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
|
### Nodes & Canvas
|
||||||
- Debug status overlay gated and toggleable on macOS/iOS/Android nodes.
|
- Debug status overlay gated and toggleable on macOS/iOS/Android nodes.
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ final class HighlightedMenuItemHostView: NSView {
|
|||||||
|
|
||||||
override func layout() {
|
override func layout() {
|
||||||
super.layout()
|
super.layout()
|
||||||
|
self.updateTargetWidthFromWindow()
|
||||||
self.hosting.frame = self.bounds
|
self.hosting.frame = self.bounds
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,6 +84,18 @@ final class HighlightedMenuItemHostView: NSView {
|
|||||||
let size = self.hosting.fittingSize
|
let size = self.hosting.fittingSize
|
||||||
self.frame = NSRect(origin: .zero, size: NSSize(width: self.targetWidth, height: size.height))
|
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 {
|
struct MenuHostedHighlightedItem: NSViewRepresentable {
|
||||||
|
|||||||
Reference in New Issue
Block a user