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:
parent
2fe5d0e1e8
commit
2f0d5651a9
16 changed files with 196 additions and 30 deletions
|
@ -91,7 +91,15 @@ NativeWindow::NativeWindow(const gin_helper::Dictionary& options,
|
|||
options.Get(options::ktitleBarOverlay, &titlebar_overlay_);
|
||||
} else if (titlebar_overlay->IsObject()) {
|
||||
titlebar_overlay_ = true;
|
||||
#if !defined(OS_WIN)
|
||||
|
||||
gin_helper::Dictionary titlebar_overlay =
|
||||
gin::Dictionary::CreateEmpty(options.isolate());
|
||||
options.Get(options::ktitleBarOverlay, &titlebar_overlay);
|
||||
int height;
|
||||
if (titlebar_overlay.Get(options::kOverlayHeight, &height))
|
||||
titlebar_overlay_height_ = height;
|
||||
|
||||
#if !(defined(OS_WIN) || defined(OS_MAC))
|
||||
DCHECK(false);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue