From b491a4c82f608e8bbbc0e08d3da1ba6897fbee2b Mon Sep 17 00:00:00 2001 From: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com> Date: Wed, 15 Sep 2021 17:34:51 -0700 Subject: [PATCH] fix: add casing for WCO edge (#30938) --- shell/browser/ui/views/win_frame_view.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/browser/ui/views/win_frame_view.cc b/shell/browser/ui/views/win_frame_view.cc index 64c7f6ad56d..9d8a460b830 100644 --- a/shell/browser/ui/views/win_frame_view.cc +++ b/shell/browser/ui/views/win_frame_view.cc @@ -235,9 +235,10 @@ void WinFrameView::LayoutCaptionButtons() { // portion to return the correct hit test and be manually resized properly. // Alternatives can be explored, but the differences in view structures // between Electron and Chromium may result in this as the best option. + int variable_width = + IsMaximized() ? preferred_size.width() : preferred_size.width() - 1; caption_button_container_->SetBounds(width() - preferred_size.width(), - WindowTopY(), preferred_size.width() - 1, - height); + WindowTopY(), variable_width, height); } void WinFrameView::LayoutWindowControlsOverlay() {