mirror of
https://github.com/imputnet/helium.git
synced 2026-08-20 00:57:32 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e6eda294f | |||
| f32b04755e | |||
| 75d044b9a6 | |||
| 0ec967b7d6 |
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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
@@ -1 +1 @@
|
||||
4
|
||||
5
|
||||
|
||||
Reference in New Issue
Block a user