You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
'backgroundMaterial' is not work in frameless window #38466
the feature can only work when the frame: true and the window should be transparent:
constwin=newBrowserWindow({frame: true,width: 800,height: 600,transparent: true,backgroundMaterial: "acrylic",webPreferences: {enableRemoteModule: true,// Use pluginOptions.nodeIntegration, leave this alone// See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more infonodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION,devTools: true}})
And there is another concern that when both frame and transparent are set true, the maximize button turns disabled.
The issue is that the frame option cannot be both true and false at the same time. You can either set frame to true and remove the transparent option, or set frame to false and add the transparent option. Which option you choose will depend on your specific needs.
When both frame and transparent are set to true, the maximize button is disabled because the window cannot be maximized if it does not have a frame. The maximize button is used to maximize a window, which means to make it fill the entire screen. If a window does not have a frame, it cannot be maximized because there is no border to stretch to the edges of the screen.
There are a few ways to work around this issue. One way is to set frame to false and then use the Window.setMaximized() method to manually maximize the window.
This seems to be a solution to maximize the window, but when transparent is false, the backgroundMaterial can be only seen in the title bar. And I think it would be best to enable the backgroundMaterial when the frame is false, so that I can use the customized title bar.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
still does not work on v27.0.0-beta.8.
I want to apply the backgroundMaterial while keeping the shadow and maximization feature, but without enabling transparent, the backgroundMaterial won't be applied.
Activity
Bhavyaatrivedi commentedon May 28, 2023
Hi, I want to work on this issue.
Bhavyaatrivedi commentedon May 28, 2023
Can you provide me with the path of file where the issue has been observed.
aleversn commentedon May 28, 2023
Sure, you can try this repo https://github.com/Creator-SN/VFluentForElectron
In the
background.js(https://github.com/Creator-SN/VFluentForElectron/blob/master/src/background.js), there is theBrowserWindowthe feature can only work when the
frame: trueand the window should be transparent:And there is another concern that when both
frameandtransparentare settrue, the maximize button turns disabled.Bhavyaatrivedi commentedon May 29, 2023
The issue is that the frame option cannot be both true and false at the same time. You can either set frame to true and remove the transparent option, or set frame to false and add the transparent option. Which option you choose will depend on your specific needs.
When both frame and transparent are set to true, the maximize button is disabled because the window cannot be maximized if it does not have a frame. The maximize button is used to maximize a window, which means to make it fill the entire screen. If a window does not have a frame, it cannot be maximized because there is no border to stretch to the edges of the screen.
There are a few ways to work around this issue. One way is to set frame to false and then use the Window.setMaximized() method to manually maximize the window.
aleversn commentedon May 29, 2023
This seems to be a solution to maximize the window, but when transparent is false, the backgroundMaterial can be only seen in the title bar. And I think it would be best to enable the backgroundMaterial when the frame is false, so that I can use the customized title bar.
electron-issue-triage commentedon Sep 4, 2023
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
JellyBrick commentedon Sep 29, 2023
still does not work on
v27.0.0-beta.8.I want to apply the
backgroundMaterialwhile keeping the shadow and maximization feature, but without enablingtransparent, thebackgroundMaterialwon't be applied.24 remaining items
fix: backgroundMaterial on initial activate
fix: `backgroundMaterial` on initial activate (electron#46657)
fix: `backgroundMaterial` on initial activate (electron#46657)