Compare commits

...

4 Commits

Author SHA1 Message Date
wukko 4e6eda294f revision: bump to 5 (#623) 2025-12-15 13:46:38 +00:00
wukko f32b04755e helium/ui: fix pwa toolbar & location bar layout (#620) 2025-12-15 08:56:28 +00:00
wukko 75d044b9a6 helium/ui/tabs: fix in-place pinned tab muting/unmuting (#619)
fixes #586
2025-12-15 14:53:17 +06:00
wukko 0ec967b7d6 helium/ui/cat: fix layout breakage when exiting fullscreen, again (#616) 2025-12-14 16:01:08 +06:00
6 changed files with 79 additions and 36 deletions
@@ -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);
-22
View File
@@ -1,22 +0,0 @@
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_utils.h
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_utils.h
@@ -11,7 +11,7 @@ class ToolbarButton;
class ToolbarButtonProvider;
#if BUILDFLAG(IS_MAC)
-inline constexpr int kWebAppMenuMargin = 7;
+inline constexpr int kWebAppMenuMargin = 4;
#endif
// Makes adjustments to |toolbar_button| for display in a web app frame.
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.cc
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.cc
@@ -85,7 +85,7 @@ WebAppToolbarButtonContainer::WebAppTool
.SetDefault(
views::kMarginsKey,
gfx::Insets::VH(
- 0, HorizontalPaddingBetweenPageActionsAndAppMenuButtons()))
+ 0, 9))
.SetCollapseMargins(true)
.SetIgnoreDefaultMainAxisMargins(true)
.SetCrossAxisAlignment(views::LayoutAlignment::kCenter)
+59
View File
@@ -0,0 +1,59 @@
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_utils.h
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_utils.h
@@ -11,7 +11,7 @@ class ToolbarButton;
class ToolbarButtonProvider;
#if BUILDFLAG(IS_MAC)
-inline constexpr int kWebAppMenuMargin = 7;
+inline constexpr int kWebAppMenuMargin = 2;
#endif
// Makes adjustments to |toolbar_button| for display in a web app frame.
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.cc
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.cc
@@ -85,7 +85,7 @@ WebAppToolbarButtonContainer::WebAppTool
.SetDefault(
views::kMarginsKey,
gfx::Insets::VH(
- 0, HorizontalPaddingBetweenPageActionsAndAppMenuButtons()))
+ 0, GetLayoutConstant(TOP_BAR_VERTICAL_PADDING) * 2))
.SetCollapseMargins(true)
.SetIgnoreDefaultMainAxisMargins(true)
.SetCrossAxisAlignment(views::LayoutAlignment::kCenter)
--- a/chrome/browser/ui/views/location_bar/custom_tab_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/custom_tab_bar_view.cc
@@ -145,7 +145,7 @@ class CustomTabBarTitleOriginView : publ
views::MaximumFlexSizeRule::kPreferred));
location_label_ = AddChildView(std::move(location_label));
- if (should_show_title) {
+ if ((false)) {
auto title_label = std::make_unique<views::Label>(
std::u16string(), views::style::CONTEXT_LABEL);
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_utils.cc
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_utils.cc
@@ -25,7 +25,7 @@ void ConfigureWebAppToolbarButton(
int WebAppFrameRightMargin() {
#if BUILDFLAG(IS_MAC)
- return kWebAppMenuMargin;
+ return 10;
#else
return HorizontalPaddingBetweenPageActionsAndAppMenuButtons();
#endif
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_navigation_button_container.cc
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_navigation_button_container.cc
@@ -31,12 +31,7 @@
namespace {
constexpr int kPaddingBetweenNavigationButtons = 5;
-
-#if BUILDFLAG(IS_CHROMEOS)
constexpr int kWebAppFrameLeftMargin = 2;
-#else
-constexpr int kWebAppFrameLeftMargin = 7;
-#endif
} // namespace
+5 -1
View File
@@ -186,7 +186,7 @@
}
bool Tab::ShouldRenderAsNormalTab() const {
@@ -1254,15 +1253,25 @@ void Tab::UpdateTabIconNeedsAttentionBlo
@@ -1254,15 +1253,29 @@ void Tab::UpdateTabIconNeedsAttentionBlo
}
int Tab::GetWidthOfLargestSelectableRegion() const {
@@ -209,6 +209,10 @@
+
+ int selectable_region = width();
+
+ if (!ShouldRenderAsNormalTab()) {
+ return selectable_region;
+ }
+
+ if (alert_indicator_button_->GetVisible()) {
+ selectable_region = alert_indicator_button_->bounds().right();
+ }
+1 -1
View File
@@ -257,7 +257,7 @@ helium/ui/bangs-ui.patch
helium/ui/thinner-infobar.patch
helium/ui/reduce-text-button-height.patch
helium/ui/smaller-window-grab-handle.patch
helium/ui/fix-pwa-toolbar.patch
helium/ui/pwa-toolbar.patch
helium/ui/top-container.patch
helium/ui/status-bubble.patch
helium/ui/clean-incognito-guest-ntp.patch
+1 -1
View File
@@ -1 +1 @@
4
5