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
refactor(desktop): flatten splash to a dark surface with a hairline
Elian Doran95f053f34734
diff --git a/apps/desktop/electron-forge/setup-icon/generate/README.md b/apps/desktop/electron-forge/setup-icon/generate/README.mdindex 64176b2415..b51ecdbd29 100644--- a/apps/desktop/electron-forge/setup-icon/generate/README.md+++ b/apps/desktop/electron-forge/setup-icon/generate/README.md@@ -39,14 +39,17 @@ Run it on **Windows** so the wordmark renders in Segoe UI (the font is rasterize## Framing- 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 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.+ transparent). The splash is a **flat dark surface with a 1px hairline**. The surface 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 surface degrades more gracefully than a light one (gentle on a+ dark desktop, unremarkable on a light one, whereas a light one is a harsh bright flash for dark-mode+ users). The colorful trillium also pops on it. The one cost is that the mark's white "starburst"+ (the surface showing through the leaf gaps) becomes dark.+- The **hairline** does the work a drop shadow can't: on a dark desktop the dark surface nearly+ matches the background, so the hairline is what gives the splash a defined edge; on a light desktop+ the dark fill already contrasts and the hairline just reads as a crisp border. (An earlier+ card-on-tray framing was dropped once the surface went dark — the tray collapsed into an invisible+ margin and the shadow stopped showing, leaving the hairline as the only thing earning its keep.)## Encoding@@ -54,15 +57,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, tray, wordmark) are **pinned** into the palette: gifenc's+- The flat colors (surface, hairline, 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).+ white card, in an earlier light design, used to go warm). `deriveAnchorColors()` reads the surface+ and hairline from the first rendered frame — so changing the surface tone in `splash.html` needs no+ change here — and pins the wordmark colour explicitly (update it there if the wordmark changes).## Output contract-- 640 × 480, opaque; dark tray (`#23262b`) + dark card (`#2b2f36`). Transparency is used only for delta+- 640 × 480, opaque; flat dark surface (`#26292f`) + 1px hairline (`#484d57`). 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 6cc556d081..33f48134ee 100644--- a/apps/desktop/electron-forge/setup-icon/generate/generate.mts+++ b/apps/desktop/electron-forge/setup-icon/generate/generate.mts@@ -102,8 +102,8 @@ function deriveAnchorColors(frame0: Uint8Array): number[][] {return [frame0[i], frame0[i + 1], frame0[i + 2]];};return [- pixel(WIDTH / 2, 60), // card (dark; empty at t = 0)- pixel(3, 3), // tray (corner, outside the card)+ pixel(WIDTH / 2, 60), // surface (dark; empty at t = 0)+ pixel(0, HEIGHT / 2), // hairline border (1px window edge)[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 44e51e4b90..3bcc6147be 100644--- a/apps/desktop/electron-forge/setup-icon/generate/splash.html+++ b/apps/desktop/electron-forge/setup-icon/generate/splash.html@@ -12,16 +12,18 @@}/* The window has no chrome or shadow (Squirrel's Update.exe is WindowStyle.None+ 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:+ user's Windows theme. A dark surface 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. */+ on a light screen doesn't glare the way a bright one does on a dark screen).+ The surface is a single flat dark fill with a 1px hairline: on a dark desktop+ the fill nearly matches the background, so the hairline is what gives the splash+ a defined edge; on a light desktop the dark fill already contrasts. */.stage {width: 640px;height: 480px;box-sizing: border-box;- background: #23262b;+ background: #26292f;+ border: 1px solid #484d57;display: flex;align-items: center;justify-content: center;@@ -29,11 +31,6 @@user-select: none;}.card {- width: 582px;- height: 430px;- background: #2b2f36;- border-radius: 18px;- box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);display: flex;flex-direction: column;align-items: center;diff --git a/apps/desktop/electron-forge/setup-icon/setup-banner-dev.gif b/apps/desktop/electron-forge/setup-icon/setup-banner-dev.gifindex 34a0ad70c3..5c260d85c1 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 5e7f9965e7..deabc00946 100644Binary files a/apps/desktop/electron-forge/setup-icon/setup-banner.gif and b/apps/desktop/electron-forge/setup-icon/setup-banner.gif differ