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: add WCO height option #31222

Merged
merged 15 commits into from Jan 24, 2022
Merged

feat: add WCO height option #31222

merged 15 commits into from Jan 24, 2022

Conversation

mlaurencin
Copy link
Contributor

@mlaurencin mlaurencin commented Oct 1, 2021

Description of Change

Closes #30857

This PR adds a height option to the Windows and macOS implementations of the Window Controls Overlay. See this other PR for the initial implementations. The height specified is in pixels.

Current Issues:

  • Adding docs
  • Fixing macOS button placement

Checklist

Release Notes

Notes: Added height option for Windows Control Overlay

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Oct 1, 2021
@MarshallOfSound
Copy link
Member

Would a macOS compatible height option also be something of interest?

Yes 👍 😆

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Oct 8, 2021
@mlaurencin mlaurencin marked this pull request as ready for review October 15, 2021 06:09
Copy link
Member

@ckerr ckerr left a comment

Choose a reason for hiding this comment

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

with my wg-api hat on... looks like the only API change is the new optional height integer, is that correct?

Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

Documentation needs to be updated to reflect change applies to macOS as well.

docs/api/browser-window.md Outdated Show resolved Hide resolved
shell/browser/native_window.cc Show resolved Hide resolved
shell/browser/ui/views/win_frame_view.cc Outdated Show resolved Hide resolved
shell/browser/ui/views/win_frame_view.cc Show resolved Hide resolved
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Copy link
Member

@zcbenz zcbenz left a comment

Choose a reason for hiding this comment

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

API LGTM

Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

Mac traffic light position is not correct (this was tested with height of 50):
Screen Shot 2021-11-15 at 11 35 31 AM

@trop
Copy link
Contributor

trop bot commented Feb 17, 2022

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

jkleinsc added a commit that referenced this pull request Feb 22, 2022
* feat: add WCO height option

* add docs and mac functionality

* add macOS functionality and height lowerbound

* Update docs/api/browser-window.md

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* update macOS functionality

* add chromium related notes

* add test and fix pixel under button bug and fix typo

* revert changes to docs/api/frameless-window.md

* modify `useCustomHeight` calls

* update `useCustomHeight` and `getCurrentMargin`

* modify margin calculation

* fix minimum custom height on macOS

* Update window_buttons_proxy.mm

* fix specified traffic light positions

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
mlaurencin added a commit that referenced this pull request Feb 23, 2022
* feat: add WCO height option

* add docs and mac functionality

* add macOS functionality and height lowerbound

* Update docs/api/browser-window.md

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* update macOS functionality

* add chromium related notes

* add test and fix pixel under button bug and fix typo

* revert changes to docs/api/frameless-window.md

* modify `useCustomHeight` calls

* update `useCustomHeight` and `getCurrentMargin`

* modify margin calculation

* fix minimum custom height on macOS

* Update window_buttons_proxy.mm

* fix specified traffic light positions

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
@trop
Copy link
Contributor

trop bot commented Feb 23, 2022

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

mlaurencin added a commit that referenced this pull request Feb 23, 2022
* feat: add WCO height option

* add docs and mac functionality

* add macOS functionality and height lowerbound

* Update docs/api/browser-window.md

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* update macOS functionality

* add chromium related notes

* add test and fix pixel under button bug and fix typo

* revert changes to docs/api/frameless-window.md

* modify `useCustomHeight` calls

* update `useCustomHeight` and `getCurrentMargin`

* modify margin calculation

* fix minimum custom height on macOS

* Update window_buttons_proxy.mm

* fix specified traffic light positions

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
@trop
Copy link
Contributor

trop bot commented Feb 23, 2022

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

@trop
Copy link
Contributor

trop bot commented Feb 23, 2022

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

jkleinsc added a commit that referenced this pull request Feb 28, 2022
* feat: add WCO height option (#31222)

* feat: add WCO height option

* add docs and mac functionality

* add macOS functionality and height lowerbound

* Update docs/api/browser-window.md

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* update macOS functionality

* add chromium related notes

* add test and fix pixel under button bug and fix typo

* revert changes to docs/api/frameless-window.md

* modify `useCustomHeight` calls

* update `useCustomHeight` and `getCurrentMargin`

* modify margin calculation

* fix minimum custom height on macOS

* Update window_buttons_proxy.mm

* fix specified traffic light positions

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Update win_caption_button.h

* Update win_caption_button_container.h

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
jkleinsc added a commit that referenced this pull request Feb 28, 2022
* feat: add WCO height option (#31222)

* feat: add WCO height option

* add docs and mac functionality

* add macOS functionality and height lowerbound

* Update docs/api/browser-window.md

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* update macOS functionality

* add chromium related notes

* add test and fix pixel under button bug and fix typo

* revert changes to docs/api/frameless-window.md

* modify `useCustomHeight` calls

* update `useCustomHeight` and `getCurrentMargin`

* modify margin calculation

* fix minimum custom height on macOS

* Update window_buttons_proxy.mm

* fix specified traffic light positions

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Update win_caption_button.h

* Update win_caption_button_container.h

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review/requested 🗳 semver/minor backwards-compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Set Windows control overlay height
7 participants