Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frame: false doesn't remove the titlebar's background color #32

Open
iuriineves opened this issue Feb 15, 2024 · 3 comments
Open

frame: false doesn't remove the titlebar's background color #32

iuriineves opened this issue Feb 15, 2024 · 3 comments

Comments

@iuriineves
Copy link

Description

Setting frame: false on the MicaBrowserWindow options doesn't not get rid of the background color the title bar has.

Changing the titlebar's color using win.setCaptionColor() does change the color of the little "strip", which indicates it is indeed the titlebar.

This issue is very similar to (if not the same as) issue #13. Changing the system setting "Show accent color on title bars and windows borders" seems to fix the issue, might look into that.

Screenshots

Expected

image

Actual Result

image

To Reproduce

Create a MicaBrowserWindows with the setting frame: false while having the system setting "Show accent color on title bars and windows borders" turned on.

@GregVido
Copy link
Owner

I need to figure out how to do it on Windows but at the moment I don't have much time :/

@iuriineves
Copy link
Author

No worries, take your time with it. Turning off the setting "Show accent color on title bars and windows borders" does seem to get rid of it, maybe the color is acting on the window itself instead of the titlebar?

image

@iuriineves
Copy link
Author

Update!

After extensive tinkering with mica-electron yesterday, I made some interesting discoveries.

In the main.js file, setting the BrowserWindow to transparent seemed to resolve the initial issue. However, this change exposed several other problems, such as the absence of animations and square corners.

To my surprise, Windows updated itself last night, seemingly resolving the issue on its own. While I'm uncertain about the exact fix, a cumulative update appeared to have addressed the problem automatically.

Now, what I've noticed in the main.js file is that the following code disrupts animations:

if (IS_ELECTRON_BETA)
    args[0].transparent = true; //Line 195

Initially, this line appeared to fix some issues after updating Electron to a newer version. However, after the recent Windows update, it seems this line is no longer necessary. I'll investigate any potential side effects it may be causing. If none are found, I'll proceed with submitting a PR.

Have a great day!

image

(The app now working, even with "Show accent color on title bars and windows borders" turned on)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants