Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(desktop): make the splash card dark for graceful theme handling
Elian Doran2b2557f8594d
diff --git a/apps/desktop/electron-forge/setup-icon/generate/README.md b/apps/desktop/electron-forge/setup-icon/generate/README.mdindex 7f107cf420..64176b2415 100644--- a/apps/desktop/electron-forge/setup-icon/generate/README.md+++ b/apps/desktop/electron-forge/setup-icon/generate/README.md@@ -40,9 +40,13 @@ Run it on **Windows** so the wordmark renders in Segoe UI (the font is rasterize- The window has no chrome and no drop shadow (Squirrel's `Update.exe` is `WindowStyle.None` +transparent), and GIF's 1-bit transparency can't cast a soft shadow onto the desktop. So the splash- is a **card on a tray**: an opaque light-neutral tray holding a rounded white card whose soft- shadow falls on the tray. The tray is a touch darker than the card, so it separates on its own —- including against a white Explorer pane, where a plain white splash would vanish.+ is a **card on a tray**: an opaque tray holding a rounded, slightly-lighter card whose soft shadow+ falls on the tray, giving a defined, elevated boundary against any surface.+- The card is **dark**, on purpose. The installer ships one baked GIF that can't follow the user's+ Windows theme, and no opaque surface is theme-neutral. A dark card degrades more gracefully than a+ light one: it's gentle on a dark desktop and unremarkable on a light one, whereas a light card is a+ harsh bright flash for dark-mode users. The colorful trillium also pops on the dark card. The one+ cost is that the mark's white "starburst" (card showing through the leaf gaps) becomes dark.## Encoding@@ -50,15 +54,15 @@ Run it on **Windows** so the wordmark renders in Segoe UI (the font is rasterizewritten as a transparent index over the kept canvas (`dispose: 1`). This shrinks the mostly-staticsteady tail to almost nothing (~140 KiB total). It saves file size only — not `Update.exe` memory,which re-expands every frame to full size regardless.-- The large flat colors (card white, tray, wordmark) are **pinned** into the palette:- gifenc's `applyPalette` nearest-color search is approximate, so without pinning the big white card- drifts to a warm near-white. `deriveAnchorColors()` reads these colors from the first rendered- frame and forces any exact-match pixel to that palette index, so changing the tray/card tone in- `splash.html` needs no change in the generator.+- The large flat colors (card, tray, wordmark) are **pinned** into the palette: gifenc's+ `applyPalette` nearest-color search is approximate, so without pinning a big flat area drifts (the+ white card used to go warm). `deriveAnchorColors()` reads the card and tray from the first rendered+ frame — so changing the tray/card tone in `splash.html` needs no change here — and pins the wordmark+ colour explicitly (update it there if the wordmark colour changes).## Output contract-- 640 × 480, opaque; light-neutral tray (`#eceef1`) + white card. Transparency is used only for delta+- 640 × 480, opaque; dark tray (`#23262b`) + dark card (`#2b2f36`). Transparency is used only for deltaframes — frame 0 is a full opaque frame, so the loop resets cleanly with no reliance on desktopshow-through. 108 frames, ~20 s loop, infinite loop, 255-color global palette, ~140 KiB.- The mark and wordmark are drawn larger than strictly needed: Squirrel's `Update.exe` is notdiff --git a/apps/desktop/electron-forge/setup-icon/generate/generate.mts b/apps/desktop/electron-forge/setup-icon/generate/generate.mtsindex e9f6e9315a..6cc556d081 100644--- a/apps/desktop/electron-forge/setup-icon/generate/generate.mts+++ b/apps/desktop/electron-forge/setup-icon/generate/generate.mts@@ -102,9 +102,9 @@ function deriveAnchorColors(frame0: Uint8Array): number[][] {return [frame0[i], frame0[i + 1], frame0[i + 2]];};return [- pixel(WIDTH / 2, 60), // card (white; empty at t = 0)+ pixel(WIDTH / 2, 60), // card (dark; empty at t = 0)pixel(3, 3), // tray (corner, outside the card)- [35, 41, 32] // wordmark (#232920)+ [242, 243, 245] // wordmark (#f2f3f5)];}diff --git a/apps/desktop/electron-forge/setup-icon/generate/splash.html b/apps/desktop/electron-forge/setup-icon/generate/splash.htmlindex 37ae1a8c25..44e51e4b90 100644--- a/apps/desktop/electron-forge/setup-icon/generate/splash.html+++ b/apps/desktop/electron-forge/setup-icon/generate/splash.html@@ -11,15 +11,17 @@background: #ffffff;}/* The window has no chrome or shadow (Squirrel's Update.exe is WindowStyle.None- + transparent), and GIF's 1-bit transparency can't cast a soft shadow onto the- desktop. So the stage is an opaque neutral "tray" with a hairline edge, holding- a rounded white card whose soft shadow falls on the tray — giving the splash a- defined, elevated boundary against any surface (e.g. a white Explorer pane). */+ + transparent), and the installer ships ONE baked GIF that can't follow the+ user's Windows theme. A dark card degrades more gracefully than a light one:+ it's gentle on a dark desktop and unremarkable on a light one (a dark element+ on a light screen doesn't glare the way a bright card does on a dark screen).+ The stage is a dark tray holding a slightly-lighter dark card, so the card+ reads as elevated even where the tray blends into a dark desktop. */.stage {width: 640px;height: 480px;box-sizing: border-box;- background: #eceef1;+ background: #23262b;display: flex;align-items: center;justify-content: center;@@ -29,9 +31,9 @@.card {width: 582px;height: 430px;- background: #ffffff;+ background: #2b2f36;border-radius: 18px;- box-shadow: 0 5px 18px rgba(22, 24, 30, 0.16), 0 1px 3px rgba(22, 24, 30, 0.10);+ box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);display: flex;flex-direction: column;align-items: center;@@ -48,12 +50,12 @@font-size: 36px;font-weight: 600;letter-spacing: 0.01em;- color: #232920;+ color: #f2f3f5;display: flex;align-items: baseline;gap: 13px;}- .word-notes { font-weight: 350; color: #6b7264; }+ .word-notes { font-weight: 350; color: #9aa0a8; }.nightly-badge {display: none;font-size: 14px;diff --git a/apps/desktop/electron-forge/setup-icon/setup-banner-dev.gif b/apps/desktop/electron-forge/setup-icon/setup-banner-dev.gifindex 3bcf4c12b6..34a0ad70c3 100644Binary files a/apps/desktop/electron-forge/setup-icon/setup-banner-dev.gif and b/apps/desktop/electron-forge/setup-icon/setup-banner-dev.gif differdiff --git a/apps/desktop/electron-forge/setup-icon/setup-banner.gif b/apps/desktop/electron-forge/setup-icon/setup-banner.gifindex fdf55cef9e..5e7f9965e7 100644Binary files a/apps/desktop/electron-forge/setup-icon/setup-banner.gif and b/apps/desktop/electron-forge/setup-icon/setup-banner.gif differ