mirror of
https://github.com/morgan9e/helium
synced 2026-04-14 00:14:20 +09:00
helium/ui/cat: fix layout breakage when exiting fullscreen, again (#616)
This commit is contained in:
@@ -122,21 +122,23 @@
|
||||
// TODO(pbos): Investigate whether the side panels should be creatable when
|
||||
--- a/chrome/browser/ui/views/frame/layout/browser_view_layout_impl_old.cc
|
||||
+++ b/chrome/browser/ui/views/frame/layout/browser_view_layout_impl_old.cc
|
||||
@@ -411,6 +411,13 @@ void BrowserViewLayoutImplOld::LayoutTab
|
||||
views().tab_strip_region_view->SetBounds(0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
@@ -406,6 +406,15 @@ void BrowserViewLayoutImplOld::LayoutVer
|
||||
void BrowserViewLayoutImplOld::LayoutTabStripRegion(
|
||||
gfx::Rect& available_bounds) {
|
||||
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutTabStripRegion");
|
||||
+
|
||||
+ // If the CAT feature is enabled, then the tab strip is in the toolbar.
|
||||
+ // We shouldn't layout it here.
|
||||
+ if (features::IsHeliumCatEnabled()) {
|
||||
+ // If the CAT feature is enabled and we're in a normal browser,
|
||||
+ // skip laying out the tab strip region. It's laid out in the toolbar.
|
||||
+ // The tab strip isn't drawn in other browser types, so the next
|
||||
+ // if statement will hide it.
|
||||
+ if (features::IsHeliumCatEnabled() && browser()->is_type_normal()) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
// 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(
|
||||
@@ -458,6 +465,15 @@ void BrowserViewLayoutImplOld::LayoutToo
|
||||
if (!delegate().ShouldDrawTabStrip()) {
|
||||
SetViewVisibility(views().tab_strip_region_view, false);
|
||||
views().tab_strip_region_view->SetBounds(0, 0, 0, 0);
|
||||
@@ -458,6 +467,15 @@ void BrowserViewLayoutImplOld::LayoutToo
|
||||
toolbar_bounds.set_x(available_bounds.x());
|
||||
toolbar_bounds.set_width(toolbar_bounds.width() - kVerticalTabStripWidth);
|
||||
views().toolbar->SetBoundsRect(toolbar_bounds);
|
||||
|
||||
Reference in New Issue
Block a user