mirror of
https://github.com/morgan9e/helium
synced 2026-04-14 00:14:20 +09:00
helium/ui: fix pwa toolbar & location bar layout (#620)
This commit is contained in:
@@ -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
patches/helium/ui/pwa-toolbar.patch
Normal file
59
patches/helium/ui/pwa-toolbar.patch
Normal 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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user