fix: remove desktop translucency to reduce macOS compositing cost
This commit is contained in:
@@ -147,8 +147,6 @@ export type DesktopSettings = {
|
||||
skillCatalogs?: SkillCatalogConfig[];
|
||||
// Opt-in to send anonymous usage reports for update checks (default: true)
|
||||
reportUsage?: boolean;
|
||||
// macOS window vibrancy effect (default: true)
|
||||
desktopVibrancy?: boolean;
|
||||
};
|
||||
|
||||
type TauriGlobal = {
|
||||
@@ -639,18 +637,3 @@ export const clearDesktopCache = async (): Promise<boolean> => {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
export const desktopSetVibrancy = async (enabled: boolean): Promise<boolean> => {
|
||||
if (!isTauriShell()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
const tauri = (window as unknown as { __TAURI__?: TauriGlobal }).__TAURI__;
|
||||
await tauri?.core?.invoke?.('desktop_set_vibrancy', { enabled });
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.warn('Failed to set vibrancy', error);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user