From e6c84c69f956b230f05cb5403dcb3efbeca520bc Mon Sep 17 00:00:00 2001 From: Simon Hong Date: Mon, 16 Dec 2024 13:44:07 +0900 Subject: [PATCH 1/4] Adjusted split view tile and its tabs padding/margin in non-vertical fix https://github.com/brave/brave-browser/issues/42913 --- browser/ui/views/tabs/brave_tab_container.cc | 10 ++++++++-- browser/ui/views/tabs/brave_tab_style_views.inc.cc | 5 ++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/browser/ui/views/tabs/brave_tab_container.cc b/browser/ui/views/tabs/brave_tab_container.cc index 7f3b57550c11..58a285634608 100644 --- a/browser/ui/views/tabs/brave_tab_container.cc +++ b/browser/ui/views/tabs/brave_tab_container.cc @@ -331,8 +331,14 @@ void BraveTabContainer::PaintBoundingBoxForTile(gfx::Canvas& canvas, const bool is_vertical_tab = tabs::utils::ShouldShowVerticalTabs(tab_slot_controller_->GetBrowser()); if (!is_vertical_tab) { - // In order to make gap between the bounding box and toolbar. - bounding_rects.Inset(gfx::Insets::VH(1, 0)); + // In order to make margin between the bounding box and tab strip. + // Need to compensate the amount of overlap because it's hidden by overlap + // at bottom. + constexpr int kVerticalMargin = 2; + const int margin_bottom = + kVerticalMargin + GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP); + bounding_rects.Inset( + gfx::Insets::TLBR(kVerticalMargin, 0, margin_bottom, 0)); } constexpr auto kRadius = 12.f; // same value with --leo-radius-l diff --git a/browser/ui/views/tabs/brave_tab_style_views.inc.cc b/browser/ui/views/tabs/brave_tab_style_views.inc.cc index 3b9079384d48..0f5ea082e4de 100644 --- a/browser/ui/views/tabs/brave_tab_style_views.inc.cc +++ b/browser/ui/views/tabs/brave_tab_style_views.inc.cc @@ -223,9 +223,8 @@ SkPath BraveVerticalTabStyle::GetPath( tab_left += scale * kPaddingForVerticalTab; tab_right -= scale * kPaddingForVerticalTab; } else { - // As the horizontal tab has padding already we only gives 1 dip padding. - // Accumulative padding will be 4 dips. - constexpr auto kPaddingForHorizontalTab = 1; + // Give 2 dip more padding when tab is in tile. + constexpr auto kPaddingForHorizontalTab = 2; tab_top += scale * kPaddingForHorizontalTab; tab_bottom -= scale * kPaddingForHorizontalTab; tab()->controller()->IsFirstTabInTile(tab()) From 5124a7d2cfb8727c229a2f105753faa46ddc96d1 Mon Sep 17 00:00:00 2001 From: Simon Hong Date: Mon, 16 Dec 2024 15:33:48 +0900 Subject: [PATCH 2/4] Adjusted split view tab's bounds/padding in vertical tab --- browser/ui/views/tabs/brave_tab.cc | 5 ++ browser/ui/views/tabs/brave_tab.h | 1 + browser/ui/views/tabs/brave_tab_container.cc | 29 +++++++++++- browser/ui/views/tabs/brave_tab_container.h | 3 ++ .../views/tabs/brave_tab_style_views.inc.cc | 46 ++++++++++++------- .../chrome/browser/ui/views/tabs/tab.h | 1 + 6 files changed, 67 insertions(+), 18 deletions(-) diff --git a/browser/ui/views/tabs/brave_tab.cc b/browser/ui/views/tabs/brave_tab.cc index 309682b52b29..03523f069c47 100644 --- a/browser/ui/views/tabs/brave_tab.cc +++ b/browser/ui/views/tabs/brave_tab.cc @@ -54,6 +54,11 @@ std::u16string BraveTab::GetTooltipText(const gfx::Point& p) const { return Tab::GetTooltipText(p); } +void BraveTab::UpdateBorder() { + // In vertical tab, different border is used based on split view state. + SetBorder(views::CreateEmptyBorder(tab_style_views()->GetContentsInsets())); +} + int BraveTab::GetWidthOfLargestSelectableRegion() const { // Assume the entire region except the area that alert indicator/close buttons // occupied is available for click-to-select. diff --git a/browser/ui/views/tabs/brave_tab.h b/browser/ui/views/tabs/brave_tab.h index 8bd14932d8c3..798e14bfc706 100644 --- a/browser/ui/views/tabs/brave_tab.h +++ b/browser/ui/views/tabs/brave_tab.h @@ -24,6 +24,7 @@ class BraveTab : public Tab { // Tab: std::u16string GetTooltipText(const gfx::Point& p) const override; + void UpdateBorder() override; // Overridden because we moved alert button to left side in the tab whereas // upstream put it on right side. Need to consider this change for calculating diff --git a/browser/ui/views/tabs/brave_tab_container.cc b/browser/ui/views/tabs/brave_tab_container.cc index 58a285634608..fa44f6d4b9f7 100644 --- a/browser/ui/views/tabs/brave_tab_container.cc +++ b/browser/ui/views/tabs/brave_tab_container.cc @@ -470,7 +470,6 @@ std::optional BraveTabContainer::GetDropIndex( continue; } - const bool is_tab_pinned = tab->data().pinned; // When dropping text or links onto pinned tabs, we need to take the @@ -601,10 +600,12 @@ void BraveTabContainer::HandleDragExited() { } void BraveTabContainer::OnTileTabs(const TabTile& tile) { + UpdateTabsBorderInTile(tile); SchedulePaint(); } void BraveTabContainer::OnDidBreakTile(const TabTile& tile) { + UpdateTabsBorderInTile(tile); SchedulePaint(); } @@ -757,5 +758,31 @@ void BraveTabContainer::SetDropArrow( drop_arrow_->SetWindowBounds(drop_bounds); } +bool BraveTabContainer::IsPinnedTabContainer() const { + return tabs_view_model_.view_size() > 0 && tabs_view_model_.view_at(0)->data().pinned; +} + +void BraveTabContainer::UpdateTabsBorderInTile(const TabTile& tile) { + auto* tab_strip_model = tab_slot_controller_->GetBrowser()->tab_strip_model(); + const int offset = + IsPinnedTabContainer() ? 0 : tab_strip_model->IndexOfFirstNonPinnedTab(); + + auto tab1_index = tab_strip_model->GetIndexOfTab(tile.first) - offset; + auto tab2_index = tab_strip_model->GetIndexOfTab(tile.second) - offset; + + if (!controller_->IsValidModelIndex(tab1_index) || + !controller_->IsValidModelIndex(tab2_index)) { + // In case the tiled tab is not in this container, this can happen. + // For instance, this container is for pinned tabs but tabs in the tile + // are unpinned. + return; + } + + auto* tab1 = GetTabAtModelIndex(tab1_index); + auto* tab2 = GetTabAtModelIndex(tab2_index); + tab1->UpdateBorder(); + tab2->UpdateBorder(); +} + BEGIN_METADATA(BraveTabContainer) END_METADATA diff --git a/browser/ui/views/tabs/brave_tab_container.h b/browser/ui/views/tabs/brave_tab_container.h index bbb49bd5988b..099083ad2743 100644 --- a/browser/ui/views/tabs/brave_tab_container.h +++ b/browser/ui/views/tabs/brave_tab_container.h @@ -121,6 +121,9 @@ class BraveTabContainer : public TabContainerImpl, bool drop_in_group, bool* is_beneath); + bool IsPinnedTabContainer() const; + void UpdateTabsBorderInTile(const TabTile& tile); + base::flat_set closing_tabs_; raw_ptr drag_context_; diff --git a/browser/ui/views/tabs/brave_tab_style_views.inc.cc b/browser/ui/views/tabs/brave_tab_style_views.inc.cc index 0f5ea082e4de..8e4eea83dadf 100644 --- a/browser/ui/views/tabs/brave_tab_style_views.inc.cc +++ b/browser/ui/views/tabs/brave_tab_style_views.inc.cc @@ -13,6 +13,8 @@ namespace { using tabs::features::HorizontalTabsUpdateEnabled; +constexpr auto kPaddingForVerticalTabInTile = 4; + // Returns a value indicating if the browser frame view is "condensed", i.e. // that its frame border is somehow collapsed, as in fullscreen or when // maximized, or in Linux when caption buttons and the title bar are not @@ -215,13 +217,13 @@ SkPath BraveVerticalTabStyle::GetPath( } } - if (IsTabTiled(tab()) && path_type != TabStyle::PathType::kHitTest) { + if (!is_pinned && IsTabTiled(tab()) && path_type != TabStyle::PathType::kHitTest) { if (ShouldShowVerticalTabs()) { - constexpr auto kPaddingForVerticalTab = 4; - tab_top += scale * kPaddingForVerticalTab; - tab_bottom -= scale * kPaddingForVerticalTab; - tab_left += scale * kPaddingForVerticalTab; - tab_right -= scale * kPaddingForVerticalTab; + tab()->controller()->IsFirstTabInTile(tab()) + ? tab_top += scale* kPaddingForVerticalTabInTile + : tab_bottom -= scale * kPaddingForVerticalTabInTile; + tab_left += scale * kPaddingForVerticalTabInTile; + tab_right -= scale * kPaddingForVerticalTabInTile; } else { // Give 2 dip more padding when tab is in tile. constexpr auto kPaddingForHorizontalTab = 2; @@ -251,20 +253,30 @@ SkPath BraveVerticalTabStyle::GetPath( } gfx::Insets BraveVerticalTabStyle::GetContentsInsets() const { - if (!HorizontalTabsUpdateEnabled()) { - return BraveTabStyleViews::GetContentsInsets(); + const bool is_pinned = tab()->data().pinned; + auto insets = tab_style()->GetContentsInsets(); + + if (!is_pinned && ShouldShowVerticalTabs() && IsTabTiled(tab())) { + const bool is_first_tab = tab()->controller()->IsFirstTabInTile(tab()); + return insets + gfx::Insets::TLBR( + is_first_tab ? kPaddingForVerticalTabInTile : 0, 0, + is_first_tab ? 0 : kPaddingForVerticalTabInTile, 0); } - // Ignore any stroke widths when determining the horizontal contents insets. - // To make contents vertically align evenly regardless of overlap in non - // vertical tab, use it as bottom inset in a tab as it's hidden by - // overlapping. - const int bottom_inset = ShouldShowVerticalTabs() - ? 0 - : GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP); + if (HorizontalTabsUpdateEnabled()) { + // Ignore any stroke widths when determining the horizontal contents insets. + // To make contents vertically align evenly regardless of overlap in non + // vertical tab, use it as bottom inset in a tab as it's hidden by + // overlapping. + return insets + + gfx::Insets::TLBR(0, 0, + ShouldShowVerticalTabs() + ? 0 + : GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP), + 0); + } - return tab_style()->GetContentsInsets() + - gfx::Insets::TLBR(0, 0, bottom_inset, 0); + return BraveTabStyleViews::GetContentsInsets(); } TabStyle::SeparatorBounds BraveVerticalTabStyle::GetSeparatorBounds( diff --git a/chromium_src/chrome/browser/ui/views/tabs/tab.h b/chromium_src/chrome/browser/ui/views/tabs/tab.h index 8cc15a690dc0..7d2b89e7ef57 100644 --- a/chromium_src/chrome/browser/ui/views/tabs/tab.h +++ b/chromium_src/chrome/browser/ui/views/tabs/tab.h @@ -13,6 +13,7 @@ class BraveTab; kMinimumContentsWidthForCloseButtons = 55; \ friend class ::BraveTabTest; \ friend class ::BraveTab; \ + virtual void UpdateBorder() {} \ static constexpr int kMinimumContentsWidthForCloseButtons_UnUsed #define GetWidthOfLargestSelectableRegion \ From e4b5445b6b47aa41b7d956a76b41dd836556f79f Mon Sep 17 00:00:00 2001 From: Simon Hong Date: Thu, 19 Dec 2024 15:11:37 +0900 Subject: [PATCH 3/4] Use 4px between tab tile border and tab horizontal gap Also give 4px gap between split view tile and others --- browser/ui/views/tabs/brave_tab.cc | 5 ---- browser/ui/views/tabs/brave_tab.h | 1 - browser/ui/views/tabs/brave_tab_container.cc | 27 +++++++++++-------- .../views/tabs/brave_tab_style_views.inc.cc | 18 ++++++++----- .../chrome/browser/ui/views/tabs/tab.h | 1 - 5 files changed, 27 insertions(+), 25 deletions(-) diff --git a/browser/ui/views/tabs/brave_tab.cc b/browser/ui/views/tabs/brave_tab.cc index 03523f069c47..309682b52b29 100644 --- a/browser/ui/views/tabs/brave_tab.cc +++ b/browser/ui/views/tabs/brave_tab.cc @@ -54,11 +54,6 @@ std::u16string BraveTab::GetTooltipText(const gfx::Point& p) const { return Tab::GetTooltipText(p); } -void BraveTab::UpdateBorder() { - // In vertical tab, different border is used based on split view state. - SetBorder(views::CreateEmptyBorder(tab_style_views()->GetContentsInsets())); -} - int BraveTab::GetWidthOfLargestSelectableRegion() const { // Assume the entire region except the area that alert indicator/close buttons // occupied is available for click-to-select. diff --git a/browser/ui/views/tabs/brave_tab.h b/browser/ui/views/tabs/brave_tab.h index 798e14bfc706..8bd14932d8c3 100644 --- a/browser/ui/views/tabs/brave_tab.h +++ b/browser/ui/views/tabs/brave_tab.h @@ -24,7 +24,6 @@ class BraveTab : public Tab { // Tab: std::u16string GetTooltipText(const gfx::Point& p) const override; - void UpdateBorder() override; // Overridden because we moved alert button to left side in the tab whereas // upstream put it on right side. Need to consider this change for calculating diff --git a/browser/ui/views/tabs/brave_tab_container.cc b/browser/ui/views/tabs/brave_tab_container.cc index fa44f6d4b9f7..f9b652833116 100644 --- a/browser/ui/views/tabs/brave_tab_container.cc +++ b/browser/ui/views/tabs/brave_tab_container.cc @@ -15,6 +15,7 @@ #include "base/containers/flat_map.h" #include "base/feature_list.h" #include "brave/browser/ui/color/brave_color_id.h" +#include "brave/browser/ui/tabs/brave_tab_layout_constants.h" #include "brave/browser/ui/tabs/brave_tab_prefs.h" #include "brave/browser/ui/tabs/features.h" #include "brave/browser/ui/tabs/split_view_browser_data.h" @@ -309,10 +310,8 @@ void BraveTabContainer::PaintBoundingBoxForTile(gfx::Canvas& canvas, // implementations in compound_tab_container.cc implementation. Thus, we need // to add pinned tab count. auto* tab_strip_model = tab_slot_controller_->GetBrowser()->tab_strip_model(); - const bool is_pinned_tab_container = - tabs_view_model_.view_at(0)->data().pinned; const int offset = - is_pinned_tab_container ? 0 : tab_strip_model->IndexOfFirstNonPinnedTab(); + IsPinnedTabContainer() ? 0 : tab_strip_model->IndexOfFirstNonPinnedTab(); auto tab1_index = tab_strip_model->GetIndexOfTab(tile.first) - offset; auto tab2_index = tab_strip_model->GetIndexOfTab(tile.second) - offset; @@ -334,11 +333,11 @@ void BraveTabContainer::PaintBoundingBoxForTile(gfx::Canvas& canvas, // In order to make margin between the bounding box and tab strip. // Need to compensate the amount of overlap because it's hidden by overlap // at bottom. - constexpr int kVerticalMargin = 2; - const int margin_bottom = - kVerticalMargin + GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP); - bounding_rects.Inset( - gfx::Insets::TLBR(kVerticalMargin, 0, margin_bottom, 0)); + int vertical_margin = GetTabAtModelIndex(tab1_index)->data().pinned ? 4 : 2; + bounding_rects.Inset(gfx::Insets::TLBR( + vertical_margin, brave_tabs::kHorizontalTabInset, + vertical_margin + GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP), + brave_tabs::kHorizontalTabInset)); } constexpr auto kRadius = 12.f; // same value with --leo-radius-l @@ -759,7 +758,8 @@ void BraveTabContainer::SetDropArrow( } bool BraveTabContainer::IsPinnedTabContainer() const { - return tabs_view_model_.view_size() > 0 && tabs_view_model_.view_at(0)->data().pinned; + return tabs_view_model_.view_size() > 0 && + tabs_view_model_.view_at(0)->data().pinned; } void BraveTabContainer::UpdateTabsBorderInTile(const TabTile& tile) { @@ -780,8 +780,13 @@ void BraveTabContainer::UpdateTabsBorderInTile(const TabTile& tile) { auto* tab1 = GetTabAtModelIndex(tab1_index); auto* tab2 = GetTabAtModelIndex(tab2_index); - tab1->UpdateBorder(); - tab2->UpdateBorder(); + + // Tab's border varies per split view state. + // See BraveVerticalTabStyle::GetContentsInsets(). + tab1->SetBorder( + views::CreateEmptyBorder(tab1->tab_style_views()->GetContentsInsets())); + tab2->SetBorder( + views::CreateEmptyBorder(tab2->tab_style_views()->GetContentsInsets())); } BEGIN_METADATA(BraveTabContainer) diff --git a/browser/ui/views/tabs/brave_tab_style_views.inc.cc b/browser/ui/views/tabs/brave_tab_style_views.inc.cc index 8e4eea83dadf..f47e25f7d3bc 100644 --- a/browser/ui/views/tabs/brave_tab_style_views.inc.cc +++ b/browser/ui/views/tabs/brave_tab_style_views.inc.cc @@ -217,7 +217,8 @@ SkPath BraveVerticalTabStyle::GetPath( } } - if (!is_pinned && IsTabTiled(tab()) && path_type != TabStyle::PathType::kHitTest) { + if (!is_pinned && IsTabTiled(tab()) && + path_type != TabStyle::PathType::kHitTest) { if (ShouldShowVerticalTabs()) { tab()->controller()->IsFirstTabInTile(tab()) ? tab_top += scale* kPaddingForVerticalTabInTile @@ -225,13 +226,16 @@ SkPath BraveVerticalTabStyle::GetPath( tab_left += scale * kPaddingForVerticalTabInTile; tab_right -= scale * kPaddingForVerticalTabInTile; } else { - // Give 2 dip more padding when tab is in tile. - constexpr auto kPaddingForHorizontalTab = 2; - tab_top += scale * kPaddingForHorizontalTab; - tab_bottom -= scale * kPaddingForHorizontalTab; + constexpr int kTotalVerticalPaddingForHorizontalTab = 6; + constexpr int kAdditionalVerticalPadding = + kTotalVerticalPaddingForHorizontalTab - brave_tabs::kHorizontalTabGap; + tab_top += scale * kAdditionalVerticalPadding; + tab_bottom -= scale * kAdditionalVerticalPadding; + + constexpr int kAdditionalHorizontalPadding = 4; tab()->controller()->IsFirstTabInTile(tab()) - ? tab_left += scale* kPaddingForHorizontalTab - : tab_right -= scale * kPaddingForHorizontalTab; + ? tab_left += scale* kAdditionalHorizontalPadding + : tab_right -= scale * kAdditionalHorizontalPadding; } } diff --git a/chromium_src/chrome/browser/ui/views/tabs/tab.h b/chromium_src/chrome/browser/ui/views/tabs/tab.h index 7d2b89e7ef57..8cc15a690dc0 100644 --- a/chromium_src/chrome/browser/ui/views/tabs/tab.h +++ b/chromium_src/chrome/browser/ui/views/tabs/tab.h @@ -13,7 +13,6 @@ class BraveTab; kMinimumContentsWidthForCloseButtons = 55; \ friend class ::BraveTabTest; \ friend class ::BraveTab; \ - virtual void UpdateBorder() {} \ static constexpr int kMinimumContentsWidthForCloseButtons_UnUsed #define GetWidthOfLargestSelectableRegion \ From fe5d4fa5695fa29ad10b15ec795db2b28ca144d4 Mon Sep 17 00:00:00 2001 From: Simon Hong Date: Fri, 20 Dec 2024 14:53:57 +0900 Subject: [PATCH 4/4] Added test for checking split view tab's path --- browser/ui/tabs/brave_tab_layout_constants.h | 2 ++ .../ui/views/frame/split_view_browsertest.cc | 35 +++++++++++++++++++ .../views/tabs/brave_tab_style_views.inc.cc | 4 +-- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/browser/ui/tabs/brave_tab_layout_constants.h b/browser/ui/tabs/brave_tab_layout_constants.h index 5ac1f40c910a..efcc3ccc44e3 100644 --- a/browser/ui/tabs/brave_tab_layout_constants.h +++ b/browser/ui/tabs/brave_tab_layout_constants.h @@ -28,6 +28,8 @@ inline constexpr int kHorizontalTabStripLeftMargin = 3; // occupied by tab group underlines. inline constexpr int kHorizontalTabVerticalSpacing = 4; +inline constexpr int kHorizontalSplitViewTabVerticalSpacing = 6; + // The height of the tab strip in horizontal mode. int GetHorizontalTabStripHeight(); diff --git a/browser/ui/views/frame/split_view_browsertest.cc b/browser/ui/views/frame/split_view_browsertest.cc index 924eb2432c70..b1aa7e46b9c3 100644 --- a/browser/ui/views/frame/split_view_browsertest.cc +++ b/browser/ui/views/frame/split_view_browsertest.cc @@ -7,16 +7,25 @@ #include "base/run_loop.h" #include "brave/browser/ui/browser_commands.h" +#include "brave/browser/ui/tabs/brave_tab_layout_constants.h" #include "brave/browser/ui/tabs/features.h" #include "brave/browser/ui/tabs/split_view_browser_data.h" #include "brave/browser/ui/views/brave_javascript_tab_modal_dialog_view_views.h" #include "brave/browser/ui/views/frame/brave_browser_view.h" #include "brave/browser/ui/views/frame/brave_contents_layout_manager.h" #include "chrome/browser/ui/browser_tabstrip.h" +#include "chrome/browser/ui/layout_constants.h" +#include "chrome/browser/ui/views/tabs/tab_strip.h" +#include "chrome/browser/ui/views/tabs/tab_style_views.h" #include "chrome/test/base/chrome_test_utils.h" #include "chrome/test/base/in_process_browser_test.h" #include "content/public/common/javascript_dialog_type.h" #include "content/public/test/browser_test.h" +#include "third_party/skia/include/core/SkPath.h" +#include "third_party/skia/include/core/SkRegion.h" +#include "ui/gfx/geometry/insets.h" +#include "ui/gfx/geometry/rect.h" +#include "ui/gfx/geometry/skia_conversions.h" class SplitViewBrowserTest : public InProcessBrowserTest { public: @@ -227,3 +236,29 @@ IN_PROC_BROWSER_TEST_F( EXPECT_EQ(web_view_bounds.CenterPoint().x(), dialog_bounds.CenterPoint().x()); } + +IN_PROC_BROWSER_TEST_F(SplitViewBrowserTest, SplitViewTabPathTest) { + brave::NewSplitViewForTab(browser()); + int active_index = tab_strip_model().active_index(); + ASSERT_NE(TabStripModel::kNoTab, active_index); + + TabStrip* tab_strip = browser_view().tabstrip(); + Tab* tab = tab_strip->tab_at(active_index); + + SkPath mask = tab->tab_style_views()->GetPath(TabStyle::PathType::kFill, + /* scale */ 1.0, + /* force_active */ false, + TabStyle::RenderUnits::kDips); + SkRegion clip_region; + clip_region.setRect({0, 0, 200, 200}); + SkRegion mask_region; + ASSERT_TRUE(mask_region.setPath(mask, clip_region)); + + EXPECT_EQ(brave_tabs::kHorizontalSplitViewTabVerticalSpacing, + mask_region.getBounds().top()); + EXPECT_EQ(brave_tabs::kHorizontalTabInset, mask_region.getBounds().left()); + EXPECT_EQ(GetLayoutConstant(TAB_STRIP_HEIGHT) - + GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP) - + (brave_tabs::kHorizontalSplitViewTabVerticalSpacing * 2), + mask_region.getBounds().height()); +} diff --git a/browser/ui/views/tabs/brave_tab_style_views.inc.cc b/browser/ui/views/tabs/brave_tab_style_views.inc.cc index f47e25f7d3bc..8ac87495e769 100644 --- a/browser/ui/views/tabs/brave_tab_style_views.inc.cc +++ b/browser/ui/views/tabs/brave_tab_style_views.inc.cc @@ -226,9 +226,9 @@ SkPath BraveVerticalTabStyle::GetPath( tab_left += scale * kPaddingForVerticalTabInTile; tab_right -= scale * kPaddingForVerticalTabInTile; } else { - constexpr int kTotalVerticalPaddingForHorizontalTab = 6; constexpr int kAdditionalVerticalPadding = - kTotalVerticalPaddingForHorizontalTab - brave_tabs::kHorizontalTabGap; + brave_tabs::kHorizontalSplitViewTabVerticalSpacing - + brave_tabs::kHorizontalTabGap; tab_top += scale * kAdditionalVerticalPadding; tab_bottom -= scale * kAdditionalVerticalPadding;