diff --git a/windows/src/Dock.tsx b/windows/src/Dock.tsx index 2a2b7369..07c7d315 100644 --- a/windows/src/Dock.tsx +++ b/windows/src/Dock.tsx @@ -639,6 +639,12 @@ export function Dock() { if (glide && glideProgress >= 1) setGlide(null) }, [glide, glideProgress]) + // The mac's second appearance. Windows cannot shape its acrylic material, so the glass is + // painted inside the same outline as the graphite surface: translucent enough for the + // desktop to move behind it, dark enough to carry the warm off-white type over any + // wallpaper, with a brighter rim than graphite gets. + const glass = prefs.theme === 'glass' + const surfaceFill = glass ? 'url(#dock-glass-fill)' : 'url(#dock-rail-fill)' const edge = flareEdge const vertical = railVertical const cross = vertical ? m.railWidth : m.horizontalRailWidth @@ -707,6 +713,16 @@ export function Dock() { + + + + + + + + + + @@ -718,9 +734,14 @@ export function Dock() { - + - +
{ordered.map((provider, index) => { @@ -758,9 +779,14 @@ export function Dock() { > {detailH > 0 ? ( ) : null} diff --git a/windows/src/lib/dockPrefs.ts b/windows/src/lib/dockPrefs.ts index db7e8b86..e847119d 100644 --- a/windows/src/lib/dockPrefs.ts +++ b/windows/src/lib/dockPrefs.ts @@ -7,14 +7,17 @@ import { invoke } from '@tauri-apps/api/core' import { listen } from '@tauri-apps/api/event' -export type DockTheme = 'graphite' | 'acrylic' +export type DockTheme = 'graphite' | 'glass' export type DockGaugeShape = 'circle' | 'squircle' export const DOCK_THEMES: Array<{ id: DockTheme; label: string }> = [ { id: 'graphite', label: 'Graphite' }, - // The mac's second appearance is Liquid Glass; the Windows equivalent is the acrylic - // window effect, so it is named after what it actually is here. - { id: 'acrylic', label: 'Acrylic' }, + // The mac's second appearance is Liquid Glass. Windows cannot shape its acrylic material: + // the DWM backdrop is drawn for the whole window rectangle and neither a window region nor + // the corner preference clips it, and the dock's window is far bigger than the rail it + // paints. So this is a translucent surface the page draws inside the rail's own outline, + // which is what "glass" can mean for a shaped window here. + { id: 'glass', label: 'Glass' }, ] export const DOCK_GAUGE_SHAPES: Array<{ id: DockGaugeShape; label: string }> = [ @@ -58,7 +61,7 @@ export function parseDockPrefs(raw: Record): DockPrefs { enabled: raw.enabled === true, preferred: typeof raw.preferred === 'string' ? raw.preferred : null, scale: Math.min(DOCK_SCALE_MAX, Math.max(DOCK_SCALE_MIN, scale)), - theme: raw.theme === 'acrylic' ? 'acrylic' : 'graphite', + theme: raw.theme === 'glass' || raw.theme === 'acrylic' ? 'glass' : 'graphite', gaugeShape: raw.gaugeShape === 'squircle' ? 'squircle' : 'circle', providers: Array.isArray(raw.providers) ? raw.providers.filter((p): p is string => typeof p === 'string') : [], manualSelection: raw.manualSelection === true, diff --git a/windows/src/settings/GeneralPane.tsx b/windows/src/settings/GeneralPane.tsx index ba40c819..627d126c 100644 --- a/windows/src/settings/GeneralPane.tsx +++ b/windows/src/settings/GeneralPane.tsx @@ -363,10 +363,6 @@ function CapacityDockSection({ quota }: { quota: QuotaState }) { ) }) )} - - Appearance and gauge shape are stored now and the rail picks them up with the Capacity - Dock work that follows this one. - ) }