Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions patches/helium/ui/smaller-minimum-window-width.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Index: src/chrome/browser/ui/views/frame/layout/browser_view_layout.h
===================================================================
--- src.orig/chrome/browser/ui/views/frame/layout/browser_view_layout.h
+++ src/chrome/browser/ui/views/frame/layout/browser_view_layout.h
@@ -93,7 +93,7 @@ class BrowserViewLayout : public views::
// very small window, even on large monitors (which is why a minimum height is
// not specified). This value is used for the main browser window only, not
// for popups.
- static constexpr int kMainBrowserContentsMinimumWidth = 500;
+ static constexpr int kMainBrowserContentsMinimumWidth = 375;

// The width of the vertical tab strip.
static constexpr int kVerticalTabStripWidth = 240;
Index: src/chrome/browser/ui/views/frame/tab_strip_region_view.cc
===================================================================
--- src.orig/chrome/browser/ui/views/frame/tab_strip_region_view.cc
+++ src/chrome/browser/ui/views/frame/tab_strip_region_view.cc
@@ -559,7 +559,7 @@ gfx::Size TabStripRegionView::GetMinimum
gfx::Size tab_strip_min_size = tab_strip_->GetMinimumSize();
// Cap the tabstrip minimum width to a reasonable value so browser windows
// aren't forced to grow arbitrarily wide.
- const int max_min_width = 520;
+ const int max_min_width = 375;
tab_strip_min_size.set_width(
std::min(max_min_width, tab_strip_min_size.width()));
return tab_strip_min_size;
Index: src/chrome/browser/ui/views/toolbar/toolbar_view.cc
===================================================================
--- src.orig/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ src/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -150,6 +150,7 @@ DEFINE_UI_CLASS_PROPERTY_KEY(bool, kActi
namespace {

constexpr int kPreferredCompactWidth = 350;
+constexpr int kCompactNavButtonsMinWidth = 500;

// Gets the display mode for a given browser.
ToolbarView::DisplayMode GetDisplayMode(Browser* browser) {
@@ -966,6 +967,10 @@ void ToolbarView::Layout(PassKey) {
if (toolbar_controller_) {
// Need to determine whether the overflow button should be visible, and only
// update it if the visibility changes.
+ const bool hide_nav_buttons = width() < kCompactNavButtonsMinWidth;
+ back_->SetVisible(!hide_nav_buttons && show_back_button_.GetValue());
+ forward_->SetVisible(!hide_nav_buttons && show_forward_button_.GetValue());
+ reload_->SetVisible(!hide_nav_buttons && show_reload_button_.GetValue());
const bool was_overflow_button_visible =
toolbar_controller_->overflow_button()->GetVisible();
const bool show_overflow_button =
1 change: 1 addition & 0 deletions patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,5 @@ helium/ui/fix-caption-button-bounds.patch
helium/ui/find-bar.patch
helium/ui/remove-zoom-action.patch
helium/ui/experiments/compact-action-toolbar.patch
helium/ui/smaller-minimum-window-width.patch
helium/ui/pdf-viewer.patch