Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

soften the dmg background glow and clear it off the icon label (#8296)

Maheswar Kumar7ef653d1b702
diff --git a/scripts/make_dmg_background.py b/scripts/make_dmg_background.py
index 361d7bea2d5..fec8521d6f5 100644
--- a/scripts/make_dmg_background.py
+++ b/scripts/make_dmg_background.py
@@ -52,16 +52,16 @@ BOTTOM_COLOR = "#F5F8F7"
GLOW_CORE = "#17B88B"
GLOW_EDGE = "#7BE8A6"
GLOW_EDGE_MIX = 0.45
-GLOW_MIX_RADIUS = 130.0
+GLOW_MIX_RADIUS = 110.0
# strength is the peak tint, sigma sets how far the halo reaches. they trade
# off: raising strength alone also pushes the visible edge outward.
-GLOW_STRENGTH = 1.85
-GLOW_SIGMA = 47.0
+GLOW_STRENGTH = 1.48
+GLOW_SIGMA = 50.0
-# the icon label sits just below the icon, so the halo is eased off downward.
-# left, right and top keep the full falloff.
-GLOW_BOTTOM_FLOOR = 0.55
+# the icon label sits just below the icon, so the halo is eased well down
+# there. left, right and top keep the full falloff.
+GLOW_BOTTOM_FLOOR = 0.30
GLOW_BOTTOM_SPAN = 90.0
# chevron between the two icons, sized to match the macOS installers this
diff --git a/studio/src-tauri/dmg/background.tiff b/studio/src-tauri/dmg/background.tiff
index ed4dc749da7..aa31037fb3d 100644
Binary files a/studio/src-tauri/dmg/background.tiff and b/studio/src-tauri/dmg/background.tiff differ
diff --git a/tests/studio/test_tauri_branding_contract.py b/tests/studio/test_tauri_branding_contract.py
index 21d30ff50b0..bfda9a41302 100644
--- a/tests/studio/test_tauri_branding_contract.py
+++ b/tests/studio/test_tauri_branding_contract.py
@@ -3,10 +3,13 @@
"""Desktop display-branding contracts."""
+import importlib.util
import json
from pathlib import Path
import struct
+import pytest
+
REPO = Path(__file__).resolve().parents[2]
FRONTEND = REPO / "studio/frontend"
@@ -117,6 +120,57 @@ def test_dmg_install_window_matches_its_background_art() -> None:
assert dmg["applicationFolderPosition"] == {"x": 480, "y": 170}
+def load_module(path: Path):
+ spec = importlib.util.spec_from_file_location(path.stem, path)
+ module = importlib.util.module_from_spec(spec)
+ spec.loader.exec_module(module)
+ return module
+
+
+def test_dmg_background_art_is_what_its_renderer_produces() -> None:
+ """The checked-in TIFF is generated, so it has to track its own script."""
+ np = pytest.importorskip("numpy")
+ ImageSequence = pytest.importorskip("PIL.ImageSequence")
+ from PIL import Image
+
+ renderer = load_module(REPO / "scripts/make_dmg_background.py")
+ image = renderer.build()
+ expected = [
+ image.resize((renderer.WIN_W, renderer.WIN_H), Image.LANCZOS).convert("RGB"),
+ image.convert("RGB"),
+ ]
+
+ # the iterator seeks one shared handle, so each page is copied off it
+ tiff = Image.open(TAURI / "dmg/background.tiff")
+ pages = [page.convert("RGB") for page in ImageSequence.Iterator(tiff)]
+ assert [page.size for page in pages] == [page.size for page in expected]
+
+ # a tolerance, not equality, so no one Pillow build is baked in. a stale asset is far worse
+ for page, reference in zip(pages, expected):
+ drift = np.abs(np.asarray(page, dtype = np.int16) - np.asarray(reference, dtype = np.int16))
+ assert drift.max() <= 2
+
+
+def test_dmg_icon_label_stays_legible_over_the_halo() -> None:
+ """Finder draws black "Unsloth" text here, so tinting it up is an accessibility change."""
+ np = pytest.importorskip("numpy")
+ pytest.importorskip("PIL")
+
+ renderer = load_module(REPO / "scripts/make_dmg_background.py")
+ scale = renderer.SCALE
+ # the band Finder puts the icon label in, just under the app icon
+ label = (
+ np.asarray(renderer.build().convert("RGB"), dtype = np.float32)[
+ 238 * scale : 260 * scale, 140 * scale : 220 * scale
+ ]
+ / 255.0
+ )
+
+ channel = np.where(label <= 0.04045, label / 12.92, ((label + 0.055) / 1.055) ** 2.4)
+ luminance = channel @ np.array([0.2126, 0.7152, 0.0722], dtype = np.float32)
+ assert (luminance.min() + 0.05) / 0.05 >= 7.0 # WCAG AAA for body text
+
+
def test_desktop_release_asset_names_are_human_readable() -> None:
workflow = read(REPO / ".github/workflows/release-desktop.yml")
assert "re.sub(r'[^0-9A-Za-z]+', '_', app_version).strip('_')" in workflow