helium/cat: fix mini toolbar bounds in popup windows (#472)

fixes #439
This commit is contained in:
wukko
2025-11-16 21:10:20 +06:00
committed by GitHub
parent 13f49f28cc
commit a4f89dfb1c

View File

@@ -104,11 +104,14 @@
// This retrieves the bounds for the tab strip based on whether or not we show
// anything to the left of it, like the incognito avatar.
gfx::Rect tab_strip_region_bounds(
@@ -587,6 +594,12 @@ void BrowserViewLayout::LayoutToolbar(gf
@@ -587,6 +594,15 @@ void BrowserViewLayout::LayoutToolbar(gf
toolbar_bounds.set_width(toolbar_bounds.width() -
BrowserView::kVerticalTabStripWidth);
toolbar_->SetBoundsRect(toolbar_bounds);
+ } else if (features::IsHeliumCatEnabled()) {
+ } else if (features::IsHeliumCatEnabled() && delegate_->ShouldDrawTabStrip()) {
+ // If CAT is enabled and the tab strip should be drawn, then we're most
+ // likely layered under window controls, so we accommodate space for
+ // them like a tab strip would.
+ gfx::Rect tab_strip_region_bounds(
+ delegate_->GetBoundsForToolbarInVerticalTabBrowserView());
+ int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0;