diff --git a/browser/ui/brave_layout_constants.cc b/browser/ui/brave_layout_constants.cc index fb03efc30ebe..1475a6d2fe19 100644 --- a/browser/ui/brave_layout_constants.cc +++ b/browser/ui/brave_layout_constants.cc @@ -43,7 +43,8 @@ std::optional GetBraveLayoutConstant(LayoutConstant constant) { } case TAB_STRIP_HEIGHT: { if (HorizontalTabsUpdateEnabled()) { - return brave_tabs::GetHorizontalTabStripHeight(); + return brave_tabs::GetHorizontalTabStripHeight() + + GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP); } return std::nullopt; } @@ -57,7 +58,7 @@ std::optional GetBraveLayoutConstant(LayoutConstant constant) { if (!HorizontalTabsUpdateEnabled()) { return std::nullopt; } - return 0; + return 1; } case LOCATION_BAR_CHILD_CORNER_RADIUS: return 4; diff --git a/browser/ui/views/frame/brave_non_client_hit_test_helper.cc b/browser/ui/views/frame/brave_non_client_hit_test_helper.cc index 7ed3b7678e0b..d927bf82f9a1 100644 --- a/browser/ui/views/frame/brave_non_client_hit_test_helper.cc +++ b/browser/ui/views/frame/brave_non_client_hit_test_helper.cc @@ -5,6 +5,7 @@ #include "brave/browser/ui/views/frame/brave_non_client_hit_test_helper.h" +#include "brave/browser/ui/views/tabs/vertical_tab_utils.h" #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/toolbar/toolbar_view.h" #include "ui/base/hit_test.h" @@ -48,6 +49,12 @@ int NonClientHitTest(BrowserView* browser_view, return hit_test_result; } + // Below checking is only for dragging with tab when vertical tab is + // enabled and title is hidden. + if (!tabs::utils::ShouldShowVerticalTabs(browser_view->browser())) { + return HTNOWHERE; + } + // Now we have only resizable areas. if (point_in_widget.x() <= kResizableArea && point_in_widget.y() <= kResizableArea) { @@ -59,35 +66,11 @@ int NonClientHitTest(BrowserView* browser_view, return HTTOPRIGHT; } - if (point_in_widget.x() <= kResizableArea && - point_in_widget.y() >= (widget_bounds.bottom() - kResizableArea)) { - return HTBOTTOMLEFT; - } - - if (point_in_widget.x() >= (widget_bounds.right() - kResizableArea) && - point_in_widget.y() >= (widget_bounds.bottom() - kResizableArea)) { - return HTBOTTOMRIGHT; - } - - if (point_in_widget.x() <= kResizableArea) { - return HTLEFT; - } - - if (point_in_widget.x() >= (widget_bounds.right() - kResizableArea)) { - return HTRIGHT; - } - if (point_in_widget.y() <= kResizableArea) { return HTTOP; } - if (point_in_widget.y() <= (widget_bounds.bottom() - kResizableArea)) { - return HTBOTTOM; - } - - NOTREACHED_IN_MIGRATION() - << "This shouldn't happen. Maybe due to inclusive/exclusive comparison?"; - return hit_test_result; + return HTNOWHERE; } } // namespace brave