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: enable windows control overlay on Windows #29600

Merged
merged 36 commits into from
Aug 11, 2021

Conversation

mlaurencin
Copy link
Member

@mlaurencin mlaurencin commented Jun 9, 2021

Description of Change

This PR enhances titlebarStyle on Windows to support Window Controls Overlay. See this PR for the macOS implementation and other documentation. The parameter titlebarStyle: 'hidden' used with titleBarOverlay: true will turn on this feature on Windows with default system colors. Additionally for the Windows implementation, the color of the overlay buttons and its symbols can be specified by setting titleBarOverlay to an object with the options color and symbolColor respectively. As addressed in the open questions of the Window Controls Overlay specification, there is no current implementation for customizing the title bar height. This will be addressed in a future PR.

Checklist

Release Notes

Notes: Added support for Windows Control Overlay on Windows.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jun 9, 2021
@mlaurencin mlaurencin added 13-x-y 14-x-y semver/minor backwards-compatible functionality labels Jun 9, 2021
Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes just so this doesn't land in the current state, we had some offline discussions mostly revolving around the large quantity of copied code in the windows PR but both PRs should be updated to only take effect when a new "overlay" tile bar style is defined. This should affect any existing apps.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jun 16, 2021
@mlaurencin mlaurencin requested a review from a team as a code owner June 16, 2021 21:12
@weifeiyue
Copy link

awsome!! Can't wait to use this feature!!

@trop
Copy link
Contributor

trop bot commented Sep 8, 2021

@mlaurencin has manually backported this PR to "13-x-y", please check out #30887

@aleksey-hoffman
Copy link

aleksey-hoffman commented Oct 8, 2021

@mlaurencin is it possible to trigger "Windows 11 snap layout" programmatically without using "native" title bar?
I have a custom titlebar in my app and I'm not sure if native titlbar allows similar customizability

@molant
Copy link
Contributor

molant commented Oct 8, 2021

@aleksey-hoffman have you look at https://web.dev/window-controls-overlay/ to see if it meets your needs?

If it doesn't, it might be good to open an issue in the original explainer:
https://github.com/WICG/window-controls-overlay/issues

@aleksey-hoffman
Copy link

@molant thanks for the links. It looks like the current implementation doesn't allow full customizability of the titlebar. It seems I will have to implement my own "Win 11 snap layouts" feature

@mlaurencin
Copy link
Member Author

@aleksey-hoffman unfortunately, I do not know of a way to trigger the snap layout programmatically.

Even if you are implementing your own feature, it might still be worth opening an issue on the explainer as mentioned above in case there are others wanting similar customizability.

@aleksey-hoffman
Copy link

@mlaurencin yep, I just checked, someone already opened an issue about this

ckerr added a commit that referenced this pull request Aug 23, 2024
ckerr added a commit that referenced this pull request Aug 24, 2024
trop bot added a commit that referenced this pull request Aug 24, 2024
added in Aug 2021 (41646d1, #29600) but never used

Co-authored-by: Charles Kerr <charles@charleskerr.com>
trop bot added a commit that referenced this pull request Aug 24, 2024
added in Aug 2021 (41646d1, #29600) but never used

Co-authored-by: Charles Kerr <charles@charleskerr.com>
trop bot added a commit that referenced this pull request Aug 24, 2024
added in Aug 2021 (41646d1, #29600) but never used

Co-authored-by: Charles Kerr <charles@charleskerr.com>
ckerr added a commit that referenced this pull request Aug 24, 2024
)

added in Aug 2021 (41646d1, #29600) but never used

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
ckerr added a commit that referenced this pull request Aug 24, 2024
)

added in Aug 2021 (41646d1, #29600) but never used

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
ckerr added a commit that referenced this pull request Aug 24, 2024
)

added in Aug 2021 (41646d1, #29600) but never used

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review/approved ✅ semver/minor backwards-compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.