From 6a2150951b57eff2d64289bd3746b577b8b74e0b Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 22 Mar 2024 15:31:29 -0400 Subject: [PATCH] chrome: Use square corners for Chrome toolbar when Views-hosted Chrome design changed to rounded top corners by default with Chrome Refresh 2023. Square corners look better when the toolbar is part of a custom Views-hosted layout, like in cefclient. --- patch/patches/chrome_runtime_views.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/patch/patches/chrome_runtime_views.patch b/patch/patches/chrome_runtime_views.patch index 2e004e7c0..d195bffc5 100644 --- a/patch/patches/chrome_runtime_views.patch +++ b/patch/patches/chrome_runtime_views.patch @@ -941,7 +941,7 @@ index e864e22e920c8..0b82bf831be8f 100644 } diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc -index 8ee63a3430928..5a296e7dfe09c 100644 +index 8ee63a3430928..bb0f09b960677 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.cc +++ chrome/browser/ui/views/toolbar/toolbar_view.cc @@ -191,7 +191,7 @@ class TabstripLikeBackground : public views::Background { @@ -1035,6 +1035,15 @@ index 8ee63a3430928..5a296e7dfe09c 100644 if (companion::IsCompanionFeatureEnabled()) { side_panel_container_ = container_view_->AddChildView( std::make_unique(browser_view_)); +@@ -811,7 +828,7 @@ void ToolbarView::Layout(PassKey) { + if (display_mode_ == DisplayMode::NORMAL) { + LayoutCommon(); + +- if (features::IsChromeRefresh2023()) { ++ if (features::IsChromeRefresh2023() && !browser_->toolbar_overridden()) { + UpdateClipPath(); + } + } diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h index 53f8ff18e0119..05d005f026d33 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.h