Skip to content

Commit

Permalink
Hide sidebar when browser window is in fullscreen mode
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhong committed Apr 5, 2021
1 parent 73e63b5 commit a4aa739
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion browser/ui/views/sidebar/sidebar_container_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit a4aa739

Please sign in to comment.