Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

transparent editor

Brendan Allanad87f4f13080
diff --git a/apps/desktop/src-tauri/src/windows.rs b/apps/desktop/src-tauri/src/windows.rs
index b2c9449f6..755f66d34 100644
--- a/apps/desktop/src-tauri/src/windows.rs
+++ b/apps/desktop/src-tauri/src/windows.rs
@@ -205,12 +205,22 @@ impl ShowCapWindow {
.maximized(false)
.center()
.build()?,
- Self::Editor { project_id } => self
- .window_builder(app, format!("/editor?id={project_id}"))
- .maximizable(true)
- .inner_size(1240.0, 800.0)
- .center()
- .build()?,
+ Self::Editor { project_id } => {
+ let window = self
+ .window_builder(app, format!("/editor?id={project_id}"))
+ .maximizable(true)
+ .transparent(true)
+ .inner_size(1240.0, 800.0)
+ .center()
+ .build()?;
+
+ window.set_effects(tauri::utils::config::WindowEffectsConfig {
+ effects: vec![tauri::window::Effect::HudWindow],
+ ..Default::default()
+ });
+
+ window
+ }
Self::Upgrade => self
.window_builder(app, "/upgrade")
.resizable(false)
diff --git a/apps/desktop/src/routes/editor/Editor.tsx b/apps/desktop/src/routes/editor/Editor.tsx
index 1d0727687..6692a4f03 100644
--- a/apps/desktop/src/routes/editor/Editor.tsx
+++ b/apps/desktop/src/routes/editor/Editor.tsx
@@ -21,7 +21,6 @@ import { Tooltip } from "@kobalte/core";
import { makePersisted } from "@solid-primitives/storage";
import Cropper, { cropToFloor } from "~/components/Cropper";
import { type Crop, events } from "~/utils/tauri";
-import { setTitlebar } from "~/utils/titlebar-state";
import { ConfigSidebar } from "./ConfigSidebar";
import {
EditorContextProvider,
@@ -117,13 +116,11 @@ function Inner() {
)
);
- setTitlebar("backgroundColor", "bg-gray-50");
-
return (
<div class="flex flex-col w-screen h-screen">
<Header />
<div
- class="flex overflow-y-hidden flex-col flex-1 gap-4 p-4 w-full leading-5 bg-gray-100 dark:bg-gray-50 backdrop-blur-md animate-in fade-in"
+ class="flex overflow-y-hidden flex-col flex-1 gap-4 p-4 w-full leading-5 !bg-transparent bg-gray-100 dark:bg-gray-50 backdrop-blur-md animate-in fade-in"
data-tauri-drag-region
>
<div class="flex overflow-hidden flex-col flex-1">
diff --git a/apps/desktop/src/routes/editor/Header.tsx b/apps/desktop/src/routes/editor/Header.tsx
index 018016ddb..5127c309a 100644
--- a/apps/desktop/src/routes/editor/Header.tsx
+++ b/apps/desktop/src/routes/editor/Header.tsx
@@ -67,8 +67,9 @@ export function Header() {
batch(() => {
setTitlebar("height", "60px");
- setTitlebar("border", true);
- setTitlebar("transparent", false);
+ setTitlebar("border", false);
+ // setTitlebar("backgroundColor", "bg-gray-50");
+ setTitlebar("transparent", true);
setTitlebar(
"items",
<div