diff --git a/patches/helium/ui/experiments/compact-action-toolbar.patch b/patches/helium/ui/experiments/compact-action-toolbar.patch index de105b0b..a1e98ffc 100644 --- a/patches/helium/ui/experiments/compact-action-toolbar.patch +++ b/patches/helium/ui/experiments/compact-action-toolbar.patch @@ -172,7 +172,23 @@ show_avatar_button_.Init( prefs::kShowAvatarButton, prefs, base::BindRepeating(&ToolbarView::OnShowAvatarButtonChanged, -@@ -700,6 +723,24 @@ bool ToolbarView::IsRectInWindowCaption( +@@ -564,10 +587,15 @@ void ToolbarView::Init() { + + InitLayout(); + ++ auto flex_preferred = views::FlexSpecification( ++ views::MinimumFlexSizeRule::kPreferred, ++ views::MaximumFlexSizeRule::kPreferred); ++ + for (auto* button : std::array{back_, forward_, reload_, + home_, avatar_}) { + if (button) { + button->set_tag(GetViewCommandMap().at(button->GetID())); ++ button->SetProperty(views::kFlexBehaviorKey, flex_preferred); + } + } + if (browser_view_->GetSupportsTabStrip()) { +@@ -700,6 +728,24 @@ bool ToolbarView::IsRectInWindowCaption( return gfx::ToEnclosingRect(rect_in_target_coords_f); }; @@ -197,7 +213,7 @@ // Check each child view in container_view_ to see if the rect intersects with // any clickable elements. If it does, check if the click is actually on that // element. False if on a clickable element, true if not on a clickable element. -@@ -998,6 +1039,12 @@ void ToolbarView::InitLayout() { +@@ -998,6 +1044,12 @@ void ToolbarView::InitLayout() { location_bar_->SetProperty(views::kMarginsKey, gfx::Insets::VH(0, location_bar_margin));