Skip to content

Build your personal knowledge base with Trilium Notes

fix(desktop): seat DMG icon captions inside taller tiles

Elian Dorana8207a0b090d
diff --git a/apps/desktop/electron-forge/dmg-background/README.md b/apps/desktop/electron-forge/dmg-background/README.md
index 63d93f6f77..4c6c918abc 100644
--- a/apps/desktop/electron-forge/dmg-background/README.md
+++ b/apps/desktop/electron-forge/dmg-background/README.md
@@ -36,13 +36,15 @@ reads `background.png`/`@2x`). Kept reproducible from source so it isn't a myste
- 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 two subtle "platforms" mark where Finder drops the real icons (app on the left, `/Applications`
- alias on the right). The icon **centers** must line up with the `contents` coordinates in
- `forge.config.ts`. Those coordinates use a **top-left** origin, y increasing downward, with `(x, y)`
- being 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 for a pedestal centered at `y` from the top,
- the `contents` entry is also `y` from the top — not `windowHeight - y`. The pedestals are centered at
- **y = 215** (`top: 140 + height: 150 / 2`), so `contents` uses `y = 215` to match.
+- The two subtle "tiles" mark where Finder drops the real icons (app on the left, `/Applications`
+ alias on the right). Each tile is tall enough (156 × 178) to hold its 128 px icon *and* the caption
+ Finder draws beneath it, so the caption lands on the flat face rather than tucking under the rounded
+ bottom corners. The icon **centers** must line up with the `contents` coordinates in `forge.config.ts`.
+ Those coordinates use a **top-left** origin, y increasing downward, with `(x, y)` being 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`. The
+ tiles span **y 122..300**; `contents` uses **y = 200**, seating the icon in the upper part with the
+ caption in the lower third.
- **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" labels under the real icons.
@@ -50,6 +52,6 @@ reads `background.png`/`@2x`). Kept reproducible from source so it isn't a myste
## Output contract
- 640 × 400 pt window; `background.png` is 640 × 400, `[email protected]` is 1280 × 800.
-- `iconSize` 128; app icon centered at (180, 215), Applications at (460, 215) in **top-left** coords,
- matching the pedestal centers in `background.html` (`top: 140 + height: 150 / 2`) — keep these in sync
- with the platform positions in `background.html` and the `contents` in the maker config.
+- `iconSize` 128; app icon centered at (180, 200), Applications at (460, 200) in **top-left** coords,
+ seated in the tiles in `background.html` (156 × 178, spanning y 122..300) — keep these in sync with the
+ tile positions in `background.html` and 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 6b10423480..a1932e0491 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 6f4ed800b6..64e1c140cd 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 e24fce5d00..c0030995b0 100644
--- a/apps/desktop/electron-forge/dmg-background/background.html
+++ b/apps/desktop/electron-forge/dmg-background/background.html
@@ -49,21 +49,25 @@
}
.variant-nightly .badge { display: inline-block; }
- /* Drop platforms — subtle pedestals under where the real icons land. */
+ /* Drop platforms — subtle tiles holding each icon AND the label Finder draws beneath
+ it. Tall enough (icon 128 + gap + caption) that the caption sits on the flat face
+ rather than tucking under the rounded bottom corners. Icon centers land at y = 200
+ (see `contents` in forge.config.ts); the caption falls in the lower third. */
.platform {
position: absolute;
- width: 150px; height: 150px;
- top: 140px;
- border-radius: 26px;
+ width: 156px; height: 178px;
+ top: 122px;
+ border-radius: 28px;
background: rgba(255, 255, 255, 0.035);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
- .platform.app { left: 105px; }
- .platform.apps { left: 385px; }
+ .platform.app { left: 102px; }
+ .platform.apps { left: 382px; }
/* Muted neutral arrow — a functional cue, kept quiet so the icons carry the colour
- (the ambient glow already reuses the brand palette). Channel-agnostic. */
- .arrow { position: absolute; top: 192px; left: 274px; width: 92px; height: 46px; }
+ (the ambient glow already reuses the brand palette). 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
arrow plus Finder's own icon labels already convey "drag to Applications". */
diff --git a/apps/desktop/electron-forge/dmg-background/background.png b/apps/desktop/electron-forge/dmg-background/background.png
index 462a8e2a82..e1de4bffb5 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 ffd9afc6e9..171dad97fe 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 ff5f439350..a4859b8f6a 100644
--- a/apps/desktop/electron-forge/dmg-background/preview.mjs
+++ b/apps/desktop/electron-forge/dmg-background/preview.mjs
@@ -33,8 +33,8 @@ const MARGIN = 44; // transparent padding around the window for its drop shadow
// Icon CENTERS in Finder's top-left content coordinates. Same values as the `contents`
// entries in forge.config.ts — these are what a real build writes into .DS_Store.
-const APP = { x: 180, y: 215, label: "Trilium Notes" };
-const APPS = { x: 460, y: 215, label: "Applications" };
+const APP = { x: 180, y: 200, label: "Trilium Notes" };
+const APPS = { x: 460, y: 200, label: "Applications" };
const bgHref = pathToFileURL(path.join(DMG_DIR, "background.png")).href;
const APPLICATIONS_ICNS = "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ApplicationsFolderIcon.icns";
diff --git a/apps/desktop/electron-forge/dmg-background/preview.png b/apps/desktop/electron-forge/dmg-background/preview.png
index f73fec4b74..20efe1f83f 100644
Binary files a/apps/desktop/electron-forge/dmg-background/preview.png and b/apps/desktop/electron-forge/dmg-background/preview.png differ
diff --git a/apps/desktop/electron-forge/forge.config.ts b/apps/desktop/electron-forge/forge.config.ts
index 9b2244d9a6..fa818de965 100644
--- a/apps/desktop/electron-forge/forge.config.ts
+++ b/apps/desktop/electron-forge/forge.config.ts
@@ -161,11 +161,12 @@ const config: ForgeConfig = {
window: { size: { width: 640, height: 400 } }
},
// Icon CENTERS in Finder's .DS_Store Iloc coordinate space: top-left origin,
- // y increasing downward. y=215 matches the platform centers in background.html
- // (top:140 + height:150/2). Verify on a macOS build (appdmg is darwin-only).
+ // y increasing downward. y=200 sits the icon in the upper part of each tile in
+ // background.html, leaving room for the caption Finder draws below it (the tiles
+ // span y 122..300). Verify on a macOS build (appdmg is darwin-only).
contents: (opts: { appPath: string }) => [
- { x: 180, y: 215, type: "file", path: opts.appPath },
- { x: 460, y: 215, type: "link", path: "/Applications" }
+ { x: 180, y: 200, type: "file", path: opts.appPath },
+ { x: 460, y: 200, type: "link", path: "/Applications" }
]
}
},