Skip to content

Commit f32b047

Browse files
authored
helium/ui: fix pwa toolbar & location bar layout (#620)
1 parent 75d044b commit f32b047

File tree

3 files changed

+60
-23
lines changed

3 files changed

+60
-23
lines changed

patches/helium/ui/fix-pwa-toolbar.patch

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_utils.h
2+
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_utils.h
3+
@@ -11,7 +11,7 @@ class ToolbarButton;
4+
class ToolbarButtonProvider;
5+
6+
#if BUILDFLAG(IS_MAC)
7+
-inline constexpr int kWebAppMenuMargin = 7;
8+
+inline constexpr int kWebAppMenuMargin = 2;
9+
#endif
10+
11+
// Makes adjustments to |toolbar_button| for display in a web app frame.
12+
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.cc
13+
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.cc
14+
@@ -85,7 +85,7 @@ WebAppToolbarButtonContainer::WebAppTool
15+
.SetDefault(
16+
views::kMarginsKey,
17+
gfx::Insets::VH(
18+
- 0, HorizontalPaddingBetweenPageActionsAndAppMenuButtons()))
19+
+ 0, GetLayoutConstant(TOP_BAR_VERTICAL_PADDING) * 2))
20+
.SetCollapseMargins(true)
21+
.SetIgnoreDefaultMainAxisMargins(true)
22+
.SetCrossAxisAlignment(views::LayoutAlignment::kCenter)
23+
--- a/chrome/browser/ui/views/location_bar/custom_tab_bar_view.cc
24+
+++ b/chrome/browser/ui/views/location_bar/custom_tab_bar_view.cc
25+
@@ -145,7 +145,7 @@ class CustomTabBarTitleOriginView : publ
26+
views::MaximumFlexSizeRule::kPreferred));
27+
location_label_ = AddChildView(std::move(location_label));
28+
29+
- if (should_show_title) {
30+
+ if ((false)) {
31+
auto title_label = std::make_unique<views::Label>(
32+
std::u16string(), views::style::CONTEXT_LABEL);
33+
34+
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_utils.cc
35+
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_utils.cc
36+
@@ -25,7 +25,7 @@ void ConfigureWebAppToolbarButton(
37+
38+
int WebAppFrameRightMargin() {
39+
#if BUILDFLAG(IS_MAC)
40+
- return kWebAppMenuMargin;
41+
+ return 10;
42+
#else
43+
return HorizontalPaddingBetweenPageActionsAndAppMenuButtons();
44+
#endif
45+
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_navigation_button_container.cc
46+
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_navigation_button_container.cc
47+
@@ -31,12 +31,7 @@
48+
namespace {
49+
50+
constexpr int kPaddingBetweenNavigationButtons = 5;
51+
-
52+
-#if BUILDFLAG(IS_CHROMEOS)
53+
constexpr int kWebAppFrameLeftMargin = 2;
54+
-#else
55+
-constexpr int kWebAppFrameLeftMargin = 7;
56+
-#endif
57+
58+
} // namespace
59+

patches/series

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ helium/ui/bangs-ui.patch
257257
helium/ui/thinner-infobar.patch
258258
helium/ui/reduce-text-button-height.patch
259259
helium/ui/smaller-window-grab-handle.patch
260-
helium/ui/fix-pwa-toolbar.patch
260+
helium/ui/pwa-toolbar.patch
261261
helium/ui/top-container.patch
262262
helium/ui/status-bubble.patch
263263
helium/ui/clean-incognito-guest-ntp.patch

0 commit comments

Comments
 (0)