From 889ce1dd261e99409becd2b1d053156371f2aec6 Mon Sep 17 00:00:00 2001 From: ashim-hq Date: Sun, 19 Apr 2026 17:04:11 +0800 Subject: [PATCH] fix: make fit/fill toggle prominent with label, enlarge zoom controls --- .../src/components/tools/collage-preview.tsx | 68 +++++++++++-------- 1 file changed, 39 insertions(+), 29 deletions(-) diff --git a/apps/web/src/components/tools/collage-preview.tsx b/apps/web/src/components/tools/collage-preview.tsx index 216fda6c..5283974a 100644 --- a/apps/web/src/components/tools/collage-preview.tsx +++ b/apps/web/src/components/tools/collage-preview.tsx @@ -474,19 +474,46 @@ function CollageCell({ )} - {/* Drag handle for reorder — top-right of selected cells */} + {/* Top bar — drag handle + fit/fill toggle */} {isSelected && image && !isLoading && (
e.stopPropagation()} onDoubleClick={(e) => e.stopPropagation()} > - + +
+ +
)} @@ -496,7 +523,7 @@ function CollageCell({ role="toolbar" aria-label="Zoom controls" className={cn( - "absolute bottom-0 left-0 right-0 flex items-center gap-2 px-2 py-1.5 bg-black/50 backdrop-blur-sm transition-opacity duration-300", + "absolute bottom-0 left-0 right-0 flex items-center gap-2 px-3 py-2 bg-black/50 backdrop-blur-sm transition-opacity duration-300", controlsVisible ? "opacity-100" : "opacity-0", )} onClick={(e) => e.stopPropagation()} @@ -510,35 +537,18 @@ function CollageCell({ step="0.1" value={transform.zoom} onChange={handleZoomSlider} - className="flex-1 h-1 accent-white cursor-pointer" + className="flex-1 h-1.5 accent-white cursor-pointer" /> - + {transform.zoom.toFixed(1)}x - )}