Skip to content

Commit

Permalink
Reduce the space above the tabstrip in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
zenparsing committed Feb 12, 2024
1 parent 29c5151 commit 72b7e08
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
return top; \
}

// The top frame border thickness is smaller when using updated horizontal tabs.
#define BRAVE_BROWSER_FRAME_VIEW_WIN_FRAME_TOP_BORDER_THICKNESS \
if (tabs::features::HorizontalTabsUpdateEnabled()) { \
return 2; \
}

#include "src/chrome/browser/ui/views/frame/browser_frame_view_win.cc" // IWYU pragma: export

#undef BRAVE_BROWSER_FRAME_VIEW_WIN_FRAME_TOP_BORDER_THICKNESS
#undef BRAVE_BROWSER_FRAME_VIEW_WIN_TOP_AREA_HEIGHT
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
diff --git a/chrome/browser/ui/views/frame/browser_frame_view_win.cc b/chrome/browser/ui/views/frame/browser_frame_view_win.cc
index 769e7e8ac3b3907328e1515c4346402891d59f03..8f5652b742a43ac913145c2aced1d2f641202061 100644
index bd59ccd1b178450c7eba720ea8b235f24416a15e..40d21c79c71f8fb76dcaa8910ebd011db0443d19 100644
--- a/chrome/browser/ui/views/frame/browser_frame_view_win.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_view_win.cc
@@ -533,6 +533,7 @@ int BrowserFrameViewWin::TopAreaHeight(bool restored) const {
@@ -488,6 +488,7 @@ int BrowserFrameViewWin::FrameTopBorderThickness(bool restored) const {
// default. When maximized, the OS sizes the window such that the border
// extends beyond the screen edges. In that case, we must return the
// default value.
+ BRAVE_BROWSER_FRAME_VIEW_WIN_FRAME_TOP_BORDER_THICKNESS
const int kTopResizeFrameArea = features::IsChromeRefresh2023() ? 1 : 5;
return kTopResizeFrameArea;
}
@@ -547,6 +548,7 @@ int BrowserFrameViewWin::TopAreaHeight(bool restored) const {
: caption_button_container_->GetPreferredSize().height();
return top;
}
+ BRAVE_BROWSER_FRAME_VIEW_WIN_TOP_AREA_HEIGHT

// In Refresh, the tabstrip controls its own top padding.
if (features::IsChromeRefresh2023()) {

0 comments on commit 72b7e08

Please sign in to comment.