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

[feat] Option for native titlebar buttons #4973

Closed
Jasenkoo opened this issue Aug 18, 2022 · 7 comments
Closed

[feat] Option for native titlebar buttons #4973

Jasenkoo opened this issue Aug 18, 2022 · 7 comments

Comments

@Jasenkoo
Copy link

Describe the problem

It would be really nice to have an option like titlebarOverlay option in electron.

While we can create a custom titlebar, since win 11, there is an option for a quick snap layout as described here.

This way we can still make a custom titlebar while keeping the native buttons.

Describe the solution you'd like

Either via plugin, or window configuration.

Alternatives considered

None

Additional context

None

@Jasenkoo Jasenkoo changed the title [feat] Option for native titlebar buttons Aug 18, 2022
@Jasenkoo Jasenkoo changed the title Option for native titlebar buttons [feat] Option for native titlebar buttons Aug 18, 2022
@FabianLars
Copy link
Member

This is covered by #2663, even though the discussion was primarily about macos, but that's only because it's much more of a problem there.

Though i think we'll introduce Windows support slightly different, at least in the first iteration. So instead of a whole titlebar we'll just offer a way to make an element by choice react to this https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/apply-snap-layout-menu#how-do-i-fix-it, but we'll see 🤷

Thanks for the FR!

@Jasenkoo
Copy link
Author

So instead of a whole titlebar we'll just offer a way to make an element by choice react to this

Even better

@MulverineX
Copy link

MulverineX commented Sep 6, 2022

@FabianLars ideally Windows would get better support than that, as building your own accurate titlebar is difficult. Themeable and/or button overlay would be ideal.

@FabianLars
Copy link
Member

@MulverineX It's not like we don't want to, the problem is that Windows doesn't have similar APIs (to our knowledge at least - i'd love to be proven wrong here).

@MulverineX
Copy link

MulverineX commented Sep 6, 2022

@FabianLars electron/electron#33066 . I had commented this on #2663

@FabianLars
Copy link
Member

@MulverineX Yep i saw that, but if we take a look at the PR where WOC itself was implemented: https://github.com/electron/electron/pull/29600/files it shows that it's insanely complicated as it's draws the controls completely manually. The main problem with that is that we don't draw anything manually in our libraries so we don't have anything we could build upon, therefore i think this way is not feasible for us.

p.s. i know that chromium itself implemented WCO recently (v102 or something?), but i don't see any way to activate or control it in WebView2 :/

@MulverineX
Copy link

@FabianLars damn, I thought the Electron team had found a proper system API for it :/. Guess that doesn't really exist, that's disappointing. Well, hopefully, it roles out to webview2 eventually. Thanks for elaborating.

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

No branches or pull requests

3 participants