Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

use correct transparent styles across os

Brendan Allanb52c8bec011c
diff --git a/apps/desktop/src/routes/editor/Editor.tsx b/apps/desktop/src/routes/editor/Editor.tsx
index 98747945f..75a51c59a 100644
--- a/apps/desktop/src/routes/editor/Editor.tsx
+++ b/apps/desktop/src/routes/editor/Editor.tsx
@@ -4,6 +4,7 @@ import { throttle } from "@solid-primitives/scheduled";
import { useSearchParams } from "@solidjs/router";
import { createMutation } from "@tanstack/solid-query";
import { convertFileSrc } from "@tauri-apps/api/core";
+import { type as ostype } from "@tauri-apps/plugin-os";
import {
Match,
Show,
@@ -41,6 +42,7 @@ import {
Subfield,
Toggle,
} from "./ui";
+import { cx } from "cva";
export function Editor() {
const [params] = useSearchParams<{ id: string }>();
@@ -117,10 +119,15 @@ function Inner() {
);
return (
- <div class="flex flex-col w-screen h-screen">
+ <div
+ class={cx(
+ "flex flex-col w-screen h-screen",
+ ostype() === "windows" ? "bg-gray-50" : "bg-transparent-window"
+ )}
+ >
<Header />
<div
- class="flex overflow-y-hidden flex-col flex-1 gap-4 p-4 w-full leading-5 bg-transparent-window animate-in fade-in"
+ class="flex overflow-y-hidden flex-col flex-1 gap-4 p-4 w-full leading-5 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 f20813634..28ea2b8a3 100644
--- a/apps/desktop/src/routes/editor/Header.tsx
+++ b/apps/desktop/src/routes/editor/Header.tsx
@@ -68,7 +68,7 @@ export function Header() {
batch(() => {
setTitlebar("height", "60px");
setTitlebar("border", true);
- setTitlebar("backgroundColor", "bg-transparent-window");
+ setTitlebar("transparent", true);
setTitlebar(
"items",
<div