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>
This commit is contained in:
Michaela Laurencin
2022-01-24 14:09:21 -08:00
committed by GitHub
parent 2fe5d0e1e8
commit 2f0d5651a9
16 changed files with 196 additions and 30 deletions

View File

@@ -36,6 +36,9 @@ const char kRoundedCorners[] = "roundedCorners";
const char kOverlayButtonColor[] = "color";
const char kOverlaySymbolColor[] = "symbolColor";
// The custom height for Window Controls Overlay.
const char kOverlayHeight[] = "height";
// Whether the window should show in taskbar.
const char kSkipTaskbar[] = "skipTaskbar";

View File

@@ -60,6 +60,7 @@ extern const char kRoundedCorners[];
extern const char ktitleBarOverlay[];
extern const char kOverlayButtonColor[];
extern const char kOverlaySymbolColor[];
extern const char kOverlayHeight[];
// WebPreferences.
extern const char kZoomFactor[];