feat: allow setting roundedCorners on Windows (#45740)

* feat: allow setting roundedCorners on Windows

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* Update docs/api/structures/base-window-options.md

Co-authored-by: Will Anderson <will@itsananderson.com>

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot] 2025-02-21 10:15:02 -06:00 committed by GitHub
parent 8934eb1af5
commit 3a65cfe339
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View file

@ -378,6 +378,11 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options,
if (!thick_frame_)
frame_style &= ~(WS_THICKFRAME | WS_CAPTION);
::SetWindowLong(GetAcceleratedWidget(), GWL_STYLE, frame_style);
bool rounded_corner = true;
options.Get(options::kRoundedCorners, &rounded_corner);
if (!rounded_corner)
SetRoundedCorners(false);
}
LONG ex_style = ::GetWindowLong(GetAcceleratedWidget(), GWL_EXSTYLE);