Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(desktop): add cursor tilt slider to config sidebar

Richie McIlroyf68036676457
diff --git a/apps/desktop/src/routes/editor/ConfigSidebar.tsx b/apps/desktop/src/routes/editor/ConfigSidebar.tsx
index aee1def1d..7ba48e6bb 100644
--- a/apps/desktop/src/routes/editor/ConfigSidebar.tsx
+++ b/apps/desktop/src/routes/editor/ConfigSidebar.tsx
@@ -224,7 +224,7 @@ type CursorPresetValues = {
friction: number;
};
-const DEFAULT_CURSOR_MOTION_BLUR = 0.5;
+const DEFAULT_CURSOR_MOTION_BLUR = 1.0;
const CURSOR_TYPE_OPTIONS = [
{
@@ -619,6 +619,18 @@ export function ConfigSidebar() {
step={1}
/>
</Field>
+ <Field name="Tilt" icon={<IconLucideRotate3d class="size-4" />}>
+ <Slider
+ value={[project.cursor.rotationAmount ?? 0.15]}
+ onChange={(v) =>
+ setProject("cursor", "rotationAmount" as any, v[0])
+ }
+ minValue={0}
+ maxValue={1}
+ step={0.01}
+ formatTooltip={(value) => `${Math.round(value * 100)}%`}
+ />
+ </Field>
<Field
name="Hide When Idle"
icon={<IconLucideTimer class="size-4" />}
diff --git a/packages/ui-solid/src/auto-imports.d.ts b/packages/ui-solid/src/auto-imports.d.ts
index a652e80ec..a47a159ba 100644
--- a/packages/ui-solid/src/auto-imports.d.ts
+++ b/packages/ui-solid/src/auto-imports.d.ts
@@ -93,6 +93,7 @@ declare global {
const IconLucideRatio: typeof import('~icons/lucide/ratio.jsx')['default']
const IconLucideRectangleHorizontal: typeof import('~icons/lucide/rectangle-horizontal.jsx')['default']
const IconLucideRefreshCw: typeof import('~icons/lucide/refresh-cw.jsx')['default']
+ const IconLucideRotate3d: typeof import('~icons/lucide/rotate3d.jsx')['default']
const IconLucideRotateCcw: typeof import('~icons/lucide/rotate-ccw.jsx')['default']
const IconLucideRotateCw: typeof import('~icons/lucide/rotate-cw.jsx')['default']
const IconLucideSave: typeof import('~icons/lucide/save.jsx')['default']