Skip to content

Build your personal knowledge base with Trilium Notes

feat(desktop): light DMG background reusing the setup gradient

Elian Doranb79b558b9448
diff --git a/apps/desktop/electron-forge/dmg-background/README.md b/apps/desktop/electron-forge/dmg-background/README.md
index ec9d89e327..748f5da4dc 100644
--- a/apps/desktop/electron-forge/dmg-background/README.md
+++ b/apps/desktop/electron-forge/dmg-background/README.md
@@ -33,27 +33,24 @@ reads `background.png`/`@2x`). Kept reproducible from source so it isn't a myste
light mode**, so the icon captions are drawn in **black in both light and dark system themes** — not the
white-on-dark you might expect in Dark mode. And the caption colour is Finder's alone: the DMG format has
no label-colour field (the `icvp` icon-view plist appdmg/ds-store write exposes only icon size, positions,
- window size, and background). appdmg also can't ship separate dark/light backgrounds (only tools like
- DropDMG can). So we keep the app caption legible with the light label plate described under *Design*.
+ window size, and background), and appdmg can't ship separate dark/light backgrounds (only tools like
+ DropDMG can). That black caption colour is why the surface is **light** (see *Design*) — the captions read
+ on their own, with no per-label trick needed.
## Design
-- Reuses the installer splash's brand language: the same dark surface and a soft glow tinted from the
- trillium's three leaves (green/orange/red — purple for nightly). The drag arrow is a muted neutral
- grey, kept quiet so it doesn't compete with the icons.
-- The icons sit directly on the dark surface (no tiles), app on the left and `/Applications` alias on the
+- **Light surface, reused verbatim from the in-app setup screen** (`apps/client/src/setup.css`, light
+ theme): soft indigo/purple/blue radial glows over the near-white left-pane base (`#f2f2f2`). The light
+ surface keeps Finder's forced-black captions legible on their own. The same gradient is used for both
+ channels; **nightly** is distinguished only by the purple leaf mark and the NIGHTLY badge. The wordmark
+ is dark (`#2b3038`, muted `#7c828c` for "Notes"), and the drag arrow is a muted neutral grey, kept quiet
+ so it doesn't compete with the icons.
+- The icons sit directly on the surface (no tiles/plates), app on the left and `/Applications` alias on the
right, with the drag arrow between them. Their **centers** must line up with the `contents` coordinates
in `forge.config.ts`, which use a **top-left** origin, y increasing downward, with `(x, y)` the icon
center — Finder's `.DS_Store` `Iloc` convention (confirmed by appdmg's own example, where `y: 344` sits
near the *bottom* of the window). So the `contents` y is measured from the top, not `windowHeight - y`.
`contents` uses **y = 200** (near the vertical middle), so Finder draws the captions at **~y = 278**.
-- **Light label plate — the Firefox DMG trick.** Because a background picture forces Finder to draw the
- captions in black (in both themes) and we can't override that colour, a light rounded **plate is baked
- into the background** under where Finder draws the "Trilium Notes" caption, so its black text stays
- legible on the dark surface. Only the app is plated: its name is a
- fixed-width brand string, whereas the localized `/Applications` name varies in width — and the folder is
- self-evident, so (like Firefox) its caption is left unplated. The plate position tracks the icon center,
- so keep it in sync if `contents` y changes; fine-tune on a macOS build like the icon positions.
- **No baked text beyond the "Trilium Notes" wordmark** (a brand name, not translated). The DMG ships one
image for every locale, so there is no localized instruction line — the arrow conveys the action, and
Finder draws the app name and "Applications" captions under the real icons.
@@ -62,4 +59,4 @@ reads `background.png`/`@2x`). Kept reproducible from source so it isn't a myste
- 640 × 400 pt window; `background.png` is 640 × 400, `[email protected]` is 1280 × 800.
- `iconSize` 128; app icon centered at (180, 200), Applications at (460, 200) in **top-left** coords —
- keep in sync with the `contents` in the maker config and the label plate position in `background.html`.
+ keep in sync with the `contents` in the maker config.
diff --git a/apps/desktop/electron-forge/dmg-background/background-dev.png b/apps/desktop/electron-forge/dmg-background/background-dev.png
index da5784ddad..527217785c 100644
Binary files a/apps/desktop/electron-forge/dmg-background/background-dev.png and b/apps/desktop/electron-forge/dmg-background/background-dev.png differ
diff --git a/apps/desktop/electron-forge/dmg-background/[email protected] b/apps/desktop/electron-forge/dmg-background/[email protected]
index 794b6874a9..f7a73767e0 100644
Binary files a/apps/desktop/electron-forge/dmg-background/[email protected] and b/apps/desktop/electron-forge/dmg-background/[email protected] differ
diff --git a/apps/desktop/electron-forge/dmg-background/background.html b/apps/desktop/electron-forge/dmg-background/background.html
index 170ea56ca6..05ac8f8f35 100644
--- a/apps/desktop/electron-forge/dmg-background/background.html
+++ b/apps/desktop/electron-forge/dmg-background/background.html
@@ -10,27 +10,23 @@
Finder also draws their text labels, so none are baked in here. Brand language
reused from the installer splash: the same dark surface, plus a soft glow and a
drag arrow tinted from the trillium's leaves. ?variant=nightly swaps to purple. */
+ /* Light surface reused VERBATIM from the in-app setup screen (apps/client/src/setup.css,
+ light theme): soft indigo/purple/blue glows over the near-white left-pane base (#f2f2f2).
+ A light background keeps Finder's icon captions — which it forces to black for any DMG
+ with a background picture — legible without a baked label plate. Same gradient for both
+ channels; nightly is distinguished only by the purple leaf mark and the NIGHTLY badge. */
.bg {
position: relative;
width: 640px;
height: 400px;
overflow: hidden;
font-family: -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
- color: #f2f3f5;
- }
- .variant-stable {
- background:
- radial-gradient(120px 90px at 34% 30%, rgba(228, 123, 25, 0.16), transparent 70%),
- radial-gradient(140px 100px at 63% 24%, rgba(79, 165, 43, 0.16), transparent 70%),
- radial-gradient(120px 100px at 50% 46%, rgba(227, 63, 59, 0.13), transparent 70%),
- linear-gradient(180deg, #2b3038 0%, #23262b 100%);
- }
- .variant-nightly {
+ color: #2b3038;
background:
- radial-gradient(120px 90px at 34% 30%, rgba(177, 138, 214, 0.16), transparent 70%),
- radial-gradient(140px 100px at 63% 24%, rgba(129, 70, 184, 0.18), transparent 70%),
- radial-gradient(120px 100px at 50% 46%, rgba(110, 46, 168, 0.15), transparent 70%),
- linear-gradient(180deg, #2b3038 0%, #23262b 100%);
+ radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
+ radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.25) 0%, transparent 50%),
+ radial-gradient(ellipse at 60% 80%, rgba(59, 130, 246, 0.25) 0%, transparent 50%),
+ #f2f2f2;
}
.brand {
@@ -40,7 +36,7 @@
}
.brand svg { width: 44px; height: 44px; display: block; }
.brand .word { font-size: 25px; font-weight: 600; letter-spacing: 0.01em; }
- .brand .word .notes { font-weight: 350; color: #9aa0a8; }
+ .brand .word .notes { font-weight: 350; color: #7c828c; }
.brand .badge {
display: none;
font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
@@ -49,28 +45,8 @@
}
.variant-nightly .badge { display: inline-block; }
- /* Light label plate baked behind the app caption — the Firefox DMG trick. A background
- picture forces Finder to render the window in light mode, so it draws icon captions in
- black in BOTH light and dark themes — illegible on this dark surface, and the DMG has no
- label-colour field to override it. So we bake a light pill under where Finder draws the
- "Trilium Notes" caption (icon center y = 200, so the caption lands ~y = 278). Only the
- app is plated: its name is a fixed-width brand,
- whereas the localized /Applications name varies in width — and the folder is self-evident,
- so like Firefox we leave it unplated. Plate position needs a macOS build to fine-tune,
- same as the icon `contents`. */
- .plate {
- position: absolute;
- top: 266px; height: 24px;
- border-radius: 12px;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
- }
- .plate.app { left: 116px; width: 128px; }
- .variant-stable .plate { background: #e9eaee; }
- .variant-nightly .plate { background: #ece2f4; }
-
- /* Muted neutral arrow — a functional cue, kept quiet so the icons carry the colour
- (the ambient glow already reuses the brand palette). Channel-agnostic. Vertically
- centered on the icon centers (y = 200). */
+ /* Muted neutral arrow — a functional cue, kept quiet so the icons carry the colour.
+ Channel-agnostic. Vertically centered on the icon centers (y = 200). */
.arrow { position: absolute; top: 177px; left: 274px; width: 92px; height: 46px; }
/* No instructional text: the DMG ships one baked image for every locale, and the
@@ -102,8 +78,6 @@
<span class="word">Trilium <span class="notes">Notes</span><span class="badge">NIGHTLY</span></span>
</div>
- <div class="plate app"></div>
-
<svg class="arrow" viewBox="0 0 92 46" aria-hidden="true">
<path d="M6 23 H74 M56 7 L80 23 L56 39" fill="none" stroke="#767d88"
stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
diff --git a/apps/desktop/electron-forge/dmg-background/background.png b/apps/desktop/electron-forge/dmg-background/background.png
index 400538b2e4..d33d269156 100644
Binary files a/apps/desktop/electron-forge/dmg-background/background.png and b/apps/desktop/electron-forge/dmg-background/background.png differ
diff --git a/apps/desktop/electron-forge/dmg-background/[email protected] b/apps/desktop/electron-forge/dmg-background/[email protected]
index 65e52d8398..b845ea84c8 100644
Binary files a/apps/desktop/electron-forge/dmg-background/[email protected] and b/apps/desktop/electron-forge/dmg-background/[email protected] differ
diff --git a/apps/desktop/electron-forge/dmg-background/preview.mjs b/apps/desktop/electron-forge/dmg-background/preview.mjs
index b2b89fcb71..b43ff00c5b 100644
--- a/apps/desktop/electron-forge/dmg-background/preview.mjs
+++ b/apps/desktop/electron-forge/dmg-background/preview.mjs
@@ -130,11 +130,9 @@ function buildHtml() {
.content .bg { position: absolute; inset: 0; width: ${WIDTH}px; height: ${HEIGHT}px; }
.item { position: absolute; width: ${ICON}px; height: ${ICON}px; transform: translate(-50%, -50%); }
.item .icon { width: ${ICON}px; height: ${ICON}px; display: block; }
- /* A background picture forces Finder to render the window in light mode, so it draws the
- captions in black in BOTH light and dark themes (not white-on-dark) — which is why this
- preview renders them black. The app label reads because it sits on the light plate baked
- into the background; the Applications label stays dark on the dark surface, as it does in
- the real DMG (and in Firefox's). */
+ /* A background picture forces Finder to draw icon captions in black (in both light and dark
+ system themes), which is why this preview renders them black. The light background keeps
+ both captions legible on their own — no per-label plate needed. */
.item .label {
position: absolute; left: 50%; top: ${ICON + 6}px; transform: translateX(-50%);
white-space: nowrap; font-size: 13px; font-weight: 500; color: #1d1d1f;
diff --git a/apps/desktop/electron-forge/dmg-background/preview.png b/apps/desktop/electron-forge/dmg-background/preview.png
index 27d25417c1..b4f31a6a54 100644
Binary files a/apps/desktop/electron-forge/dmg-background/preview.png and b/apps/desktop/electron-forge/dmg-background/preview.png differ