Skip to content
This repository was archived by the owner on Feb 9, 2024. It is now read-only.
This repository was archived by the owner on Feb 9, 2024. It is now read-only.

The transparent effect is apply to title bar when mainWindow show after apply the effect #82

Description

@Naozumi520

As the title say, the transparent effect will also apply to the title bar when mainWindow show after apply the effect:
image

Here's a part my code:

let window;
window = new BrowserWindow({
        title: 'Test',
        icon: './public/img/favicon.ico',
        webPreferences: {
            nodeIntegration: true,
            contextIsolation: false,
            backgroundThrottling: false,
            devTools: false
        },
        resizable: true,
        width: 1000,
        height: 600,
        show: false
    });

setVibrancy before showing window, the title bar will become transparent but the background still white and it just being blurry :

            setVibrancy(window, { effect: 'acrylic', disableOnBlur: true })
            window.show();
        }
    });

show the window before setVibrancy fix the issue, but I use did-finish-load as I hope the window only appear when all the component are fully loaded and this break the rules :
image

Initialize_view.webContents.on('did-finish-load', () => {
            window.show();
            setVibrancy(window, { effect: 'acrylic', disableOnBlur: true })
        }
    });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions