Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Update settings window size to 700x540
Richie McIlroy4169a05932c9
diff --git a/apps/desktop/src-tauri/src/windows.rs b/apps/desktop/src-tauri/src/windows.rsindex 6e0a4ec52..76c020ab2 100644--- a/apps/desktop/src-tauri/src/windows.rs+++ b/apps/desktop/src-tauri/src/windows.rs@@ -185,7 +185,7 @@ impl CapWindowId {Self::Main => (330.0, 345.0),Self::Editor { .. } => (1275.0, 800.0),Self::ScreenshotEditor { .. } => (800.0, 600.0),- Self::Settings => (600.0, 465.0),+ Self::Settings => (700.0, 540.0),Self::Camera => (200.0, 200.0),Self::Upgrade => (950.0, 850.0),Self::ModeSelect => (580.0, 340.0),diff --git a/apps/desktop/src/routes/(window-chrome)/settings.tsx b/apps/desktop/src/routes/(window-chrome)/settings.tsxindex 7130fd503..27e6a28fa 100644--- a/apps/desktop/src/routes/(window-chrome)/settings.tsx+++ b/apps/desktop/src/routes/(window-chrome)/settings.tsx@@ -1,14 +1,17 @@import { Button } from "@cap/ui-solid";import { A, type RouteSectionProps } from "@solidjs/router";import { getVersion } from "@tauri-apps/api/app";+import { getCurrentWindow, LogicalSize } from "@tauri-apps/api/window";import "@total-typescript/ts-reset/filter-boolean";-import { createResource, For, Show, Suspense } from "solid-js";+import { createResource, For, onMount, Show, Suspense } from "solid-js";import { CapErrorBoundary } from "~/components/CapErrorBoundary";import { SignInButton } from "~/components/SignInButton";import { authStore } from "~/store";import { trackEvent } from "~/utils/analytics";+const WINDOW_SIZE = { width: 700, height: 540 } as const;+export default function Settings(props: RouteSectionProps) {const auth = authStore.createQuery();const [version] = createResource(() => getVersion());@@ -20,6 +23,14 @@ export default function Settings(props: RouteSectionProps) {}};+ onMount(() => {+ const currentWindow = getCurrentWindow();++ currentWindow.setSize(+ new LogicalSize(WINDOW_SIZE.width, WINDOW_SIZE.height),+ );+ });+return (<div class="flex-1 flex flex-row divide-x divide-gray-3 text-[0.875rem] leading-[1.25rem] overflow-y-hidden"><div class="flex flex-col h-full bg-gray-2">