From a4aa739212ff935ddf06000bb2f8b9c547a3c661 Mon Sep 17 00:00:00 2001 From: Simon Hong Date: Mon, 5 Apr 2021 17:53:48 +0900 Subject: [PATCH] Hide sidebar when browser window is in fullscreen mode fix https://github.com/brave/brave-browser/issues/14402 --- browser/ui/views/sidebar/sidebar_container_view.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browser/ui/views/sidebar/sidebar_container_view.cc b/browser/ui/views/sidebar/sidebar_container_view.cc index 1d25143f39a7..0f7952bca324 100644 --- a/browser/ui/views/sidebar/sidebar_container_view.cc +++ b/browser/ui/views/sidebar/sidebar_container_view.cc @@ -14,6 +14,7 @@ #include "brave/browser/ui/sidebar/sidebar_model_data.h" #include "brave/browser/ui/views/sidebar/sidebar_control_view.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/browser_window.h" #include "content/public/browser/browser_context.h" #include "ui/base/theme_provider.h" #include "ui/views/border.h" @@ -82,7 +83,8 @@ void SidebarContainerView::Layout() { } gfx::Size SidebarContainerView::CalculatePreferredSize() const { - if (!initialized_ || !sidebar_control_view_->GetVisible()) + if (!initialized_ || !sidebar_control_view_->GetVisible() || + browser_->window()->IsFullscreen()) return View::CalculatePreferredSize(); const int control_view_preferred_width =