perf: optimize app startup and background lifecycles
This commit is contained in:
@@ -12,12 +12,13 @@ type NativeWindowMaterialOptions = Pick<
|
||||
export function getNativeWindowMaterialOptions(
|
||||
platform: NodeJS.Platform,
|
||||
): NativeWindowMaterialOptions {
|
||||
if (platform !== 'darwin') return {};
|
||||
|
||||
// Keep every platform on the same opaque surface. Native vibrancy forces
|
||||
// transparent compositing and makes every backdrop-filter pay the cost of
|
||||
// sampling the window behind it. Makelore's light palette already provides
|
||||
// the visual hierarchy without a native material layer.
|
||||
return {
|
||||
backgroundColor: '#00000000',
|
||||
transparent: true,
|
||||
vibrancy: 'under-window',
|
||||
visualEffectState: 'active',
|
||||
backgroundColor: '#FFFFFF',
|
||||
transparent: false,
|
||||
...(platform === 'darwin' ? { visualEffectState: 'inactive' as const } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user