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

Window loses acrylic effect after opening devTools #33

Closed
tscpp opened this issue Oct 24, 2020 · 5 comments
Closed

Window loses acrylic effect after opening devTools #33

tscpp opened this issue Oct 24, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@tscpp
Copy link
Collaborator

tscpp commented Oct 24, 2020

I'm using the wrapper class.

function createWindow() {
	const window = new BrowserWindow({
		icon: path.join(__dirname, 'icons/explorer.ico'),
		frame: false,
		vibrancy: {
			disableOnBlur: false,
			effect: 'acrylic',
			theme: 'appearance-based',
			useCustomWindowRefreshMethod: true
		},
		webPreferences: {
			nodeIntegration: true,
			enableRemoteModule: true
		},
		minWidth: 250,
		minHeight: 250
	})
	
	window.loadFile(path.join(__dirname, '../web/window.html'))

	return window
}

Before (VSCode in the background)

image

DevTools open (the effect gets completly white)

image

After (the window loses it's effect)

image

@seo-rii
Copy link
Owner

seo-rii commented Oct 24, 2020

Please try with mainWindow.webContents.openDevTools ({mode: "detach"});.

@tscpp
Copy link
Collaborator Author

tscpp commented Oct 24, 2020

Weird, the same thing still occurs...
The "DevTools open" state is removed #33 (comment). When I close the DevTools, the "After" state is still an issue.

@seo-rii
Copy link
Owner

seo-rii commented Oct 25, 2020

When the above code is applied, the devTool must be opened in a new window separate from the BrowserWindow. Isn't it?

@seo-rii seo-rii added the bug Something isn't working label Oct 25, 2020
@tscpp
Copy link
Collaborator Author

tscpp commented Oct 25, 2020

Yes, the window is attached, but the window loses its effect after closing dev tools.

seo-rii added a commit that referenced this issue Oct 25, 2020
@seo-rii
Copy link
Owner

seo-rii commented Oct 25, 2020

I couldn't find way to enable the Blur effect while devtools was open, but it was modified to re-appear the Blur effect after devtools is closed.
However, I still recommend opening devtools in a separate window.

@seo-rii seo-rii closed this as completed Oct 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants