Browse Source

fix: add casing for WCO edge (#30938)

Michaela Laurencin 3 years ago
parent
commit
b491a4c82f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      shell/browser/ui/views/win_frame_view.cc

+ 3 - 2
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() {