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 BrowserWindow.set/getWindowButtonPosition APIs #37094

Merged
merged 1 commit into from Feb 17, 2023

Conversation

zcbenz
Copy link
Member

@zcbenz zcbenz commented Feb 1, 2023

Description of Change

Close #34969.

This PR adds BrowserWindow.set/getWindowButtonPosition APIs which mean to replace the set/getTrafficLightPosition that:

  1. The new API returns null instead of { x: 0, y: 0 } when there is no custom position;
  2. The new API takes null instead of { x: 0, y: 0 } to reset the position;
  3. The new names match the naming style of set/getWindowButtonVisibility APIs.

Checklist

Release Notes

Notes: Add BrowserWindow.set/getWindowButtonPosition APIs.

@zcbenz zcbenz added semver/minor backwards-compatible functionality no-backport labels Feb 1, 2023
@electron-cation electron-cation bot added new-pr 🌱 PR opened in the last 24 hours api-review/requested 🗳 labels Feb 1, 2023
@zcbenz zcbenz force-pushed the deprecate-traffic-light-apis branch from 0a72024 to f15f3f7 Compare February 1, 2023 13:27
docs/api/browser-window.md Show resolved Hide resolved
docs/api/browser-window.md Show resolved Hide resolved
shell/browser/api/electron_api_base_window.h Outdated Show resolved Hide resolved
spec/api-browser-window-spec.ts Show resolved Hide resolved
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Feb 8, 2023
@zcbenz zcbenz force-pushed the deprecate-traffic-light-apis branch from f15f3f7 to 9095d5b Compare February 9, 2023 10:52
@zcbenz
Copy link
Member Author

zcbenz commented Feb 9, 2023

I have updated the code to properly deprecate the old APIs.

Copy link
Member

@codebytere codebytere 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
Member

@nornagon nornagon 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

docs/api/browser-window.md Show resolved Hide resolved
docs/api/browser-window.md Show resolved Hide resolved
@zcbenz zcbenz force-pushed the deprecate-traffic-light-apis branch from 9095d5b to 13f6ec0 Compare February 17, 2023 08:03
@zcbenz zcbenz merged commit 0de1012 into main Feb 17, 2023
@zcbenz zcbenz deleted the deprecate-traffic-light-apis branch February 17, 2023 10:06
@release-clerk
Copy link

release-clerk bot commented Feb 17, 2023

Release Notes Persisted

Add BrowserWindow.set/getWindowButtonPosition APIs.

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

Successfully merging this pull request may close these issues.

[Bug]: BrowserWindow.getTrafficLightPosition() returns { x: 0, y: 0 }
3 participants