From fcccffbeb7908898bae5fba10576d190acfce5db Mon Sep 17 00:00:00 2001 From: webadderall <131426131+webadderall@users.noreply.github.com> Date: Wed, 18 Mar 2026 14:08:15 +1100 Subject: [PATCH] refactor: remove redundant quick background toggle --- src/components/video-editor/SettingsPanel.tsx | 31 ------------------- src/i18n/locales/en/settings.json | 3 +- src/i18n/locales/es/settings.json | 3 +- src/i18n/locales/zh-CN/settings.json | 3 +- 4 files changed, 3 insertions(+), 37 deletions(-) diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsx index 7926e0a0..6bc2cdfb 100644 --- a/src/components/video-editor/SettingsPanel.tsx +++ b/src/components/video-editor/SettingsPanel.tsx @@ -266,10 +266,6 @@ export function SettingsPanel({ const [customImages, setCustomImages] = useState( initialEditorPreferences.customWallpapers, ); - const removeBackgroundStateRef = useRef<{ - aspectRatio: AspectRatio; - padding: number; - } | null>(null); const fileInputRef = useRef(null); useEffect(() => { @@ -315,7 +311,6 @@ export function SettingsPanel({ const [gradient, setGradient] = useState( GRADIENTS.includes(selected) ? selected : GRADIENTS[0], ); - const removeBackgroundEnabled = aspectRatio === "native" && padding === 0; const [backgroundTab, setBackgroundTab] = useState(() => getBackgroundTabForWallpaper(selected), ); @@ -342,24 +337,6 @@ export function SettingsPanel({ saveEditorPreferences({ customWallpapers: customImages }); }, [customImages]); - const handleRemoveBackgroundToggle = (checked: boolean) => { - if (checked) { - removeBackgroundStateRef.current = { - aspectRatio, - padding, - }; - onAspectRatioChange?.("native"); - onPaddingChange?.(0); - return; - } - - if (removeBackgroundStateRef.current) { - onAspectRatioChange?.(removeBackgroundStateRef.current.aspectRatio); - onPaddingChange?.(removeBackgroundStateRef.current.padding); - removeBackgroundStateRef.current = null; - } - }; - const webcamFileName = webcam?.sourcePath?.split(/[\\/]/).pop() ?? null; const zoomEnabled = Boolean(selectedZoomDepth); @@ -884,14 +861,6 @@ export function SettingsPanel({ parseInput={(t) => parseFloat(t.replace(/%$/, ""))} /> -
-
{tSettings("effects.removeBackground")}
- -