From 2a66ea4d586de1860ffc9462f59bec60989611d3 Mon Sep 17 00:00:00 2001 From: Yvette Carlisle Date: Tue, 2 Jun 2026 13:17:56 +0800 Subject: [PATCH] {"schema":"decodex/commit/1","summary":"Left-align account run chips","authority":"manual"} --- .../Sources/DecodexApp/AccountPanelView.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/decodex-app/Sources/DecodexApp/AccountPanelView.swift b/apps/decodex-app/Sources/DecodexApp/AccountPanelView.swift index aba8405d..341f7ecd 100644 --- a/apps/decodex-app/Sources/DecodexApp/AccountPanelView.swift +++ b/apps/decodex-app/Sources/DecodexApp/AccountPanelView.swift @@ -1305,7 +1305,7 @@ private final class AccountRunStripContainerView: NSView { let contentSize = hostingView.fittingSize let height = max(bounds.height, AccountRunChipLayout.height) measuredContentWidth = max(0, ceil(contentSize.width)) - let documentWidth = max(measuredContentWidth, bounds.width) + let documentWidth = max(measuredContentWidth, 1) hostingView.frame = NSRect( x: 0, @@ -1346,6 +1346,14 @@ private final class AccountRunStripContainerView: NSView { private final class AccountRunStripClipView: NSClipView { var onBoundsChange: (() -> Void)? + override func constrainBoundsRect(_ proposedBounds: NSRect) -> NSRect { + var constrainedBounds = super.constrainBoundsRect(proposedBounds) + constrainedBounds.origin.x = max(0, constrainedBounds.origin.x) + constrainedBounds.origin.y = max(0, constrainedBounds.origin.y) + + return constrainedBounds + } + override func scroll(to newOrigin: NSPoint) { let oldOrigin = bounds.origin