Fix update pill constraint feedback loop
The pill never appeared because: 1. SwiftUI .frame(width:0, height:0) when idle poisoned fittingSize 2. AppKit constraints locked at 0x0 prevented expansion on state change 3. fittingSize always returned 0 due to active 0x0 constraints Fix: Remove zero-frame from SwiftUI (always render at natural size, use opacity only). Deactivate constraints before measuring fittingSize so they don't clamp the measurement. Pass visibility to sizeToolbarItem to set constraints to zero when idle or natural size when active.
This commit is contained in:
parent
e03fc1909b
commit
679cafdc51
5 changed files with 35 additions and 15 deletions
|
|
@ -21,8 +21,6 @@ struct UpdatePill: View {
|
|||
UpdatePopoverView(model: model)
|
||||
}
|
||||
.opacity(visible ? 1 : 0)
|
||||
.frame(width: visible ? nil : 0, height: visible ? nil : 0)
|
||||
.clipped()
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue