Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Fix: auto-set padding when background is selected (#891)
Enejivk790711f55cd1
diff --git a/apps/desktop/src/routes/editor/ConfigSidebar.tsx b/apps/desktop/src/routes/editor/ConfigSidebar.tsxindex 13c7cbac0..3bc64d3fd 100644--- a/apps/desktop/src/routes/editor/ConfigSidebar.tsx+++ b/apps/desktop/src/routes/editor/ConfigSidebar.tsx@@ -745,6 +745,12 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) {}));});+ // set padding if background is selected+ const ensurePaddingForBackground = () => {+ if (project.background.padding === 0)+ setProject("background", "padding", 10);+ };+// Validate background source path on mountonMount(async () => {if (@@ -887,6 +893,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) {value={project.background.source.type}onChange={(v) => {const tab = v as BackgroundSource["type"];+ ensurePaddingForBackground();switch (tab) {case "image": {setProject("background", "source", {@@ -1118,6 +1125,8 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) {// Get the raw path without any URL prefixesdebouncedSetProject(wallpaper.rawPath);++ ensurePaddingForBackground();} catch (err) {toast.error("Failed to set wallpaper");}diff --git a/apps/desktop/src/utils/createPresets.ts b/apps/desktop/src/utils/createPresets.tsindex 75942c04e..2217a7526 100644--- a/apps/desktop/src/utils/createPresets.ts+++ b/apps/desktop/src/utils/createPresets.ts@@ -26,7 +26,7 @@ export function createPresets() {query,createPreset: async (preset: CreatePreset) => {const config = { ...preset.config };- // @ts-ignore we reeeally don't want the timeline in the preset+ // @ts-expect-error we reeeally don't want the timeline in the presetconfig.timeline = undefined;await updatePresets((store) => {