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
|
@ -30,6 +30,8 @@
|
|||
gfx::Point margin_;
|
||||
// The default left-top margin.
|
||||
gfx::Point default_margin_;
|
||||
// Current height of the title bar container.
|
||||
float height_;
|
||||
|
||||
// Track mouse moves above window buttons.
|
||||
BOOL show_on_hover_;
|
||||
|
@ -49,6 +51,10 @@
|
|||
// Set left-top margin of the window buttons..
|
||||
- (void)setMargin:(const absl::optional<gfx::Point>&)margin;
|
||||
|
||||
// Set height of button container
|
||||
- (void)setHeight:(const float)height;
|
||||
- (BOOL)useCustomHeight;
|
||||
|
||||
// Return the bounds of all 3 buttons, with margin on all sides.
|
||||
- (NSRect)getButtonsContainerBounds;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue