helium/cat: make common icons always stay unburgered

This commit is contained in:
jj
2025-11-14 22:16:18 +00:00
parent 9f7755dbd7
commit c9a0eaf2c0

View File

@@ -163,7 +163,24 @@
show_avatar_button_.Init(
prefs::kShowAvatarButton, prefs,
base::BindRepeating(&ToolbarView::OnShowAvatarButtonChanged,
@@ -700,6 +723,24 @@ bool ToolbarView::IsRectInWindowCaption(
@@ -564,10 +587,16 @@ void ToolbarView::Init() {
InitLayout();
+
+ auto flex_preferred = views::FlexSpecification(
+ views::MinimumFlexSizeRule::kPreferred,
+ views::MaximumFlexSizeRule::kPreferred);
+
for (auto* button : std::array<views::Button*, 5>{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 +729,24 @@ bool ToolbarView::IsRectInWindowCaption(
return gfx::ToEnclosingRect(rect_in_target_coords_f);
};
@@ -188,7 +205,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 +1045,12 @@ void ToolbarView::InitLayout() {
location_bar_->SetProperty(views::kMarginsKey,
gfx::Insets::VH(0, location_bar_margin));