Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
native traffic lights
Brendan Allan0bd895cf317a
diff --git a/apps/desktop-solid/src-tauri/src/lib.rs b/apps/desktop-solid/src-tauri/src/lib.rsindex c6d131ae5..8262dbd12 100644--- a/apps/desktop-solid/src-tauri/src/lib.rs+++ b/apps/desktop-solid/src-tauri/src/lib.rs@@ -890,6 +890,7 @@ fn open_editor(app: AppHandle, id: String) {.unwrap();window.create_overlay_titlebar().unwrap();+ #[cfg(target_os = "macos")]window.set_traffic_lights_inset(20.0, 48.0).unwrap();}@@ -1111,6 +1112,11 @@ pub fn run() {panic!("Failed to install FFmpeg, which is required for Cap to function. Shutting down now")};+ let main_window = app.get_webview_window("main").unwrap();+ main_window.create_overlay_titlebar().unwrap();+ #[cfg(target_os = "macos")]+ main_window.set_traffic_lights_inset(14.0, 22.0).unwrap();+app.manage(Arc::new(RwLock::new(App {handle: app.handle().clone(),start_recording_options: RecordingOptions {diff --git a/apps/desktop-solid/src-tauri/tauri.conf.json b/apps/desktop-solid/src-tauri/tauri.conf.jsonindex fc25ffa69..026a69174 100644--- a/apps/desktop-solid/src-tauri/tauri.conf.json+++ b/apps/desktop-solid/src-tauri/tauri.conf.json@@ -16,12 +16,14 @@"title": "Cap","width": 300,"height": 325,- "decorations": false,"resizable": false,"maximized": false,"shadow": true,+ "acceptFirstMouse": true,"transparent": true,- "acceptFirstMouse": true+ "hiddenTitle": true,+ "titleBarStyle": "Overlay",+ "theme": "Light"}],"security": {diff --git a/apps/desktop-solid/src/components/Header.tsx b/apps/desktop-solid/src/components/Header.tsxindex 8c6561a24..83d529750 100644--- a/apps/desktop-solid/src/components/Header.tsx+++ b/apps/desktop-solid/src/components/Header.tsx@@ -1,12 +1,8 @@export default function Header() {return (<div- class="flex items-center justify-start space-x-1 h-[44px] px-3 border-gray-200 border-b"+ class="flex items-center justify-start space-x-1 h-[44px] shrink-0 px-3 border-gray-200 border-b"data-tauri-drag-region- >- <div class="w-[12px] h-[12px] bg-[#FF5E57] border-1 border-[#E0443B] rounded-full m-0 p-0"></div>- <div class="w-[12px] h-[12px] bg-[#FFBC2E] border-1 border-[#DF9D21] rounded-full m-0 p-0"></div>- <div class="w-[12px] h-[12px] bg-[#28C83E] border-1 border-[#15A923] rounded-full m-0 p-0"></div>- </div>+ />);}diff --git a/apps/desktop-solid/src/routes/index.tsx b/apps/desktop-solid/src/routes/index.tsxindex 285a4f617..47a429c8d 100644--- a/apps/desktop-solid/src/routes/index.tsx+++ b/apps/desktop-solid/src/routes/index.tsx@@ -59,6 +59,7 @@ export default function () {};return (+ // biome-ignore lint/a11y/useKeyWithClickEvents: workaround<divclass="rounded-[1.5rem] bg-gray-50 border border-gray-200 w-screen h-screen flex flex-col overflow-hidden"onClick={handleBodyClick}