diff --git a/apps/desktop/src/routes/editor/ConfigSidebar.tsx b/apps/desktop/src/routes/editor/ConfigSidebar.tsx index 2e72ed3bc9..2e51a3cd06 100644 --- a/apps/desktop/src/routes/editor/ConfigSidebar.tsx +++ b/apps/desktop/src/routes/editor/ConfigSidebar.tsx @@ -258,7 +258,7 @@ export function ConfigSidebar() { return ( - + } @@ -452,7 +455,10 @@ export function ConfigSidebar() { )} - + } @@ -623,7 +629,7 @@ export function ConfigSidebar() { */} - + }> @@ -632,7 +638,10 @@ export function ConfigSidebar() { - + @@ -1040,7 +1049,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) { const hapticsEnabled = ostype() === "macos"; return ( - + } name="Background Image"> source().angle ?? 90; return ( - <> -
-
- { - backgrounds.gradient.from = from; - setProject("background", "source", { - type: "gradient", - from, - }); - }} - /> - { - backgrounds.gradient.to = to; - setProject("background", "source", { - type: "gradient", - to, - }); - }} - /> -
{ - const start = angle(); - const resumeHistory = projectHistory.pause(); - - createRoot((dispose) => - createEventListenerMap(window, { - mouseup: () => dispose(), - mousemove: (moveEvent) => { - const rawNewAngle = - Math.round( - start + - (downEvent.clientY - moveEvent.clientY), - ) % max; - const newAngle = moveEvent.shiftKey - ? rawNewAngle - : Math.round(rawNewAngle / 45) * 45; - - if ( - !moveEvent.shiftKey && - hapticsEnabled && - project.background.source.type === - "gradient" && - project.background.source.angle !== newAngle - ) { - commands.performHapticFeedback( - "alignment", - "now", - ); - } - - setProject("background", "source", { - type: "gradient", - angle: - newAngle < 0 ? newAngle + max : newAngle, - }); - }, - }), - ); - }} - > -
-
-
-
- - {(gradient) => ( -