Skip to content

Commit 98a54e6

Browse files
authored
Merge pull request #22000 from brave/ksmith-tabs-win-top-height
Reduce the space above the tabstrip in Windows
2 parents ecd3ce9 + 0b88281 commit 98a54e6

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

chromium_src/chrome/browser/ui/views/frame/browser_frame_view_win.cc

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
return top; \
1313
}
1414

15+
// The top frame border thickness is smaller when using updated horizontal tabs.
16+
#define BRAVE_BROWSER_FRAME_VIEW_WIN_FRAME_TOP_BORDER_THICKNESS \
17+
if (tabs::features::HorizontalTabsUpdateEnabled()) { \
18+
return 2; \
19+
}
20+
1521
#include "src/chrome/browser/ui/views/frame/browser_frame_view_win.cc" // IWYU pragma: export
1622

23+
#undef BRAVE_BROWSER_FRAME_VIEW_WIN_FRAME_TOP_BORDER_THICKNESS
1724
#undef BRAVE_BROWSER_FRAME_VIEW_WIN_TOP_AREA_HEIGHT

patches/chrome-browser-ui-views-frame-browser_frame_view_win.cc.patch

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
diff --git a/chrome/browser/ui/views/frame/browser_frame_view_win.cc b/chrome/browser/ui/views/frame/browser_frame_view_win.cc
2-
index bd59ccd1b178450c7eba720ea8b235f24416a15e..3b2be5646116d60f79baf3e968aa164245dde937 100644
2+
index bd59ccd1b178450c7eba720ea8b235f24416a15e..40d21c79c71f8fb76dcaa8910ebd011db0443d19 100644
33
--- a/chrome/browser/ui/views/frame/browser_frame_view_win.cc
44
+++ b/chrome/browser/ui/views/frame/browser_frame_view_win.cc
5-
@@ -547,6 +547,7 @@ int BrowserFrameViewWin::TopAreaHeight(bool restored) const {
5+
@@ -488,6 +488,7 @@ int BrowserFrameViewWin::FrameTopBorderThickness(bool restored) const {
6+
// default. When maximized, the OS sizes the window such that the border
7+
// extends beyond the screen edges. In that case, we must return the
8+
// default value.
9+
+ BRAVE_BROWSER_FRAME_VIEW_WIN_FRAME_TOP_BORDER_THICKNESS
10+
const int kTopResizeFrameArea = features::IsChromeRefresh2023() ? 1 : 5;
11+
return kTopResizeFrameArea;
12+
}
13+
@@ -547,6 +548,7 @@ int BrowserFrameViewWin::TopAreaHeight(bool restored) const {
614
: caption_button_container_->GetPreferredSize().height();
715
return top;
816
}

0 commit comments

Comments
 (0)