Skip to content

armgit / kokon

Public Imported from GitHub
0

Edit photos by describing the change, on your own GPU. A free, open-source alternative to Nano Banana and ChatGPT image editing: photos stay on your computer, no daily limit. One installer for Windows, Mac and Linux sets up the best open model (Qwen-Image 2.1). MCP server for AI agents.

Safari on a Mac: no room for traffic lights next to the logo (only the desktop app has them)

Gabriele Lozuponead351ba00377
diff --git a/src/components/TitleBar.tsx b/src/components/TitleBar.tsx
index 384305a..0695ba5 100644
--- a/src/components/TitleBar.tsx
+++ b/src/components/TitleBar.tsx
@@ -9,10 +9,12 @@ import { native } from "../lib/native";
import { inBrowser, isLinux, isMac } from "../lib/platform";
// macOS: room for the traffic lights on the left of the top bar (styles.css). In full screen
-// macOS hides them, so the room goes too.
+// macOS hides them, so the room goes too. `data-platform="mac"` alone (theme.js) is any Mac,
+// Safari included: its colors, not this room.
if (isMac && !inBrowser && typeof document !== "undefined") {
const root = document.documentElement;
root.dataset.platform = "mac";
+ root.dataset.trafficLights = "";
const sync = () =>
native.isFullscreen().then(
(on) => (on ? (root.dataset.fullscreen = "") : delete root.dataset.fullscreen),
diff --git a/src/styles.css b/src/styles.css
index b53fab3..2d35beb 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -937,8 +937,8 @@ kbd { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; display
/* the drag regions take the click, not the text inside them */
.wordmark *, .brand > span.project-title { pointer-events: none; }
/* macOS keeps its traffic lights over the top-left corner */
-:root[data-platform="mac"]:not([data-fullscreen]) .side-head { padding-left: 86px; }
-:root[data-platform="mac"]:not([data-fullscreen]) .app:not(:has(.sidebar)) .topbar { padding-left: 86px; }
+:root[data-traffic-lights]:not([data-fullscreen]) .side-head { padding-left: 86px; }
+:root[data-traffic-lights]:not([data-fullscreen]) .app:not(:has(.sidebar)) .topbar { padding-left: 86px; }
/* ---------- scrollbars: a thin rounded thumb, no arrows, shown while the pointer is over the
list (WebView2, WebKit); the track stays invisible ---------- */