Compare commits

..

10 Commits

Author SHA1 Message Date
wukko 8c7b2012a9 revision: bump to 8 2025-07-13 23:27:58 +06:00
wukko fe261284a0 helium/ui/layout-constants: fix avatar chip insets 2025-07-13 23:09:07 +06:00
wukko 4439e6c91b helium/ui: fix avatar button bg colors in toolbar
normal state no longer has a background and guest state is way more bearable now
2025-07-13 23:08:38 +06:00
wukko 6e8168f3bc helium/ui: remove broken side panel separator
but keep the rounded corner :3
2025-07-13 21:03:19 +06:00
wukko 3f97be7852 helium/ui: reduce split view padding & align everything 2025-07-13 21:02:35 +06:00
wukko 8136fa3543 helium/ui: revamped top container ui 2025-07-13 19:46:44 +06:00
wukko e379f406e5 revision: bump to 7 2025-07-11 23:21:53 +06:00
wukko 7a02f2ac4b helium/settings: fix expression in translate patch 2025-07-11 22:09:38 +06:00
wukko 3a8dcfc49f helium/ui: new tab design
- tabs are now narrower and shorter
- split view tabs are wider to accommodate for two tabs in one component
- tabs are now attached to the toolbar
- close button now appears only on hover/focus
- fixed tab closing animation, close button no longer slides along with the rest of the tab
- new tab button no longer interferes with the tab separator
2025-07-11 21:59:26 +06:00
wukko 2f1884b2e5 helium/ui: transparent address bar and thinner toolbar 2025-07-11 21:42:18 +06:00
11 changed files with 208 additions and 64 deletions
+14 -3
View File
@@ -17,7 +17,7 @@
const int kHandleHeight = 24;
-const int kHandlePadding = 6;
-const int kHandleWidth = 4;
+const int kHandlePadding = 3;
+const int kHandlePadding = 4;
+const int kHandleWidth = 2;
} // namespace
@@ -38,13 +38,13 @@
static constexpr int kMinWebContentsWidth = 200;
static constexpr double kMinWebContentsWidthPercentage = 0.1;
- static constexpr int kContentCornerRadius = 6;
+ static constexpr int kContentCornerRadius = 5;
+ static constexpr int kContentCornerRadius = 8;
static constexpr int kContentOutlineCornerRadius = 8;
static constexpr int kContentOutlineThickness = 1;
- static constexpr int kSplitViewContentInset = 8;
- static constexpr int kSplitViewContentPadding = 4;
+ static constexpr int kSplitViewContentInset = 3;
+ static constexpr int kSplitViewContentPadding = 2;
+ static constexpr int kSplitViewContentPadding = 0;
// ContentsContainerView holds the ContentsWebView and the outlines and
// minitoolbar when in split view.
@@ -77,6 +77,17 @@
line-height: 20px;
--- a/chrome/browser/ui/views/frame/multi_contents_view.cc
+++ b/chrome/browser/ui/views/frame/multi_contents_view.cc
@@ -192,8 +192,8 @@ void MultiContentsView::Layout(PassKey)
gfx::Size(widths.end_width, available_space.height()));
float corner_radius = 0;
if (IsInSplitView()) {
- start_rect.Inset(gfx::Insets(kSplitViewContentInset).set_right(0));
- end_rect.Inset(gfx::Insets(kSplitViewContentInset).set_left(0));
+ start_rect.Inset(gfx::Insets(kSplitViewContentInset).set_right(0).set_top(0));
+ end_rect.Inset(gfx::Insets(kSplitViewContentInset).set_left(0).set_top(0));
corner_radius = kContentCornerRadius;
}
for (auto* contents_container_view : contents_container_views_) {
@@ -235,8 +235,6 @@ MultiContentsView::ContentsContainerView
SetLayoutManager(std::make_unique<views::DelegatingLayoutManager>(this));
contents_view_ = AddChildView(
@@ -4,7 +4,7 @@
</settings-spell-check-page>
</settings-section>
</template>
+<if expr="_google_chrome">
+<if expr="False">
<settings-section page-title="$i18n{translatePageTitle}"
section="translate" nest-under-section="languages">
<settings-translate-page prefs="{{prefs}}"
+4 -17
View File
@@ -37,7 +37,7 @@
return touch_ui ? 3 : 8;
case LOCATION_BAR_HEIGHT:
- return touch_ui ? 36 : 34;
+ return touch_ui ? 36 : 30;
+ return touch_ui ? 36 : 28;
case LOCATION_BAR_ICON_SIZE:
return touch_ui ? 20 : 16;
case LOCATION_BAR_LEADING_ICON_SIZE:
@@ -46,7 +46,7 @@
return touch_ui ? 24 : 16;
case TAB_HEIGHT:
- return 34 + GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP);
+ return 33;
+ return 31;
case TAB_STRIP_HEIGHT:
return GetLayoutConstant(TAB_HEIGHT) +
GetLayoutConstant(TAB_STRIP_PADDING);
@@ -92,19 +92,6 @@
case PAGE_INFO_ICON_SIZE:
return 20;
case DOWNLOAD_ICON_SIZE:
@@ -157,10 +152,10 @@ gfx::Insets GetLayoutInsets(LayoutInset
return gfx::Insets::VH(2, 2);
case LOCATION_BAR_PAGE_INFO_ICON_PADDING:
- return touch_ui ? gfx::Insets::VH(5, 10) : gfx::Insets::VH(4, 4);
+ return touch_ui ? gfx::Insets::VH(5, 10) : gfx::Insets::VH(4, 5);
case LOCATION_BAR_PAGE_ACTION_ICON_PADDING:
- return touch_ui ? gfx::Insets::VH(5, 10) : gfx::Insets::VH(2, 2);
+ return touch_ui ? gfx::Insets::VH(5, 10) : gfx::Insets::VH(2, 3);
case TOOLBAR_ACTION_VIEW: {
// TODO(afakhry): Unify all toolbar button sizes on all platforms.
@@ -169,7 +164,7 @@ gfx::Insets GetLayoutInsets(LayoutInset
}
@@ -119,12 +106,12 @@
return GetLayoutInsets(TOOLBAR_BUTTON);
} else {
- return gfx::Insets::TLBR(7, 10, 7, 4);
+ return gfx::Insets::TLBR(5, 7, 5, 5);
+ return gfx::Insets::TLBR(4, 5, 4, 4);
}
case TOOLBAR_INTERIOR_MARGIN:
- return touch_ui ? gfx::Insets() : gfx::Insets::VH(6, 5);
+ return touch_ui ? gfx::Insets() : gfx::Insets::VH(3, 6);
+ return touch_ui ? gfx::Insets() : gfx::Insets::TLBR(0, 6, 3, 6);
case WEBUI_TAB_STRIP_TOOLBAR_INTERIOR_MARGIN:
return gfx::Insets::VH(4, 0);
@@ -157,6 +157,18 @@
gfx::Rect bounds_without_endcaps(GetLocalBounds());
bounds_without_endcaps.Inset(gfx::Insets::VH(0, border_radius));
return bounds_without_endcaps;
@@ -1197,9 +1200,9 @@ void LocationBarView::RefreshBackground(
const bool high_contrast = GetNativeTheme()->UserHasContrastPreference();
const auto* const color_provider = GetColorProvider();
- SkColor normal = color_provider->GetColor(kColorLocationBarBackground);
+ SkColor normal = color_provider->GetColor(kColorOmniboxResultsBackground);
SkColor hovered =
- color_provider->GetColor(kColorLocationBarBackgroundHovered);
+ color_provider->GetColor(kColorOmniboxResultsBackgroundHovered);
background_color_ = gfx::Tween::ColorValueBetween(opacity, normal, hovered);
if (is_caret_visible) {
--- a/chrome/browser/ui/views/location_bar/location_icon_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_icon_view.cc
@@ -110,7 +110,7 @@ SkColor LocationIconView::GetForegroundC
@@ -35,3 +35,30 @@
SetProperty(views::kMarginsKey,
gfx::Insets().set_left(resize_handle_left_margin));
} else {
--- a/chrome/browser/ui/views/side_panel/side_panel_rounded_corner.cc
+++ b/chrome/browser/ui/views/side_panel/side_panel_rounded_corner.cc
@@ -32,8 +32,7 @@ void SidePanelRoundedCorner::Layout(Pass
path.moveTo(0, 0);
path.lineTo(local_bounds.width(), 0);
path.lineTo(local_bounds.width(), local_bounds.height());
- path.lineTo(local_bounds.width() - views::Separator::kThickness,
- local_bounds.height());
+ path.lineTo(local_bounds.width(), local_bounds.height());
path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
SkPathDirection::kCCW, 0, views::Separator::kThickness);
path.lineTo(0, 0);
@@ -66,12 +65,12 @@ void SidePanelRoundedCorner::OnPaint(gfx
views::ShapeContextTokens::kSidePanelPageContentRadius);
const gfx::Rect local_bounds = GetLocalBounds();
SkPath path;
- if (is_right_aligned) {
+ if ((false)) {
path.moveTo(local_bounds.width() - views::Separator::kThickness,
local_bounds.height());
path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
SkPathDirection::kCCW, 0, views::Separator::kThickness);
- } else {
+ } else if ((false)) {
path.moveTo(local_bounds.width(), views::Separator::kThickness);
path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
SkPathDirection::kCCW, views::Separator::kThickness,
+46 -41
View File
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/tabs/tab_style.cc
+++ b/chrome/browser/ui/tabs/tab_style.cc
@@ -18,13 +18,13 @@ namespace {
@@ -18,17 +18,20 @@ namespace {
// Thickness in DIPs of the separator painted on the left and right edges of
// the tab.
@@ -12,12 +12,29 @@
constexpr int kChromeRefreshSeparatorHeight = 16;
// The padding from the top of the tab to the content area.
-constexpr int kChromeRefreshTabVerticalPadding = 6;
+constexpr int kChromeRefreshTabVerticalPadding = 7;
constexpr int kChromeRefreshTabHorizontalPadding = 8;
constexpr int kChromeRefreshTabVerticalPadding = 6;
-constexpr int kChromeRefreshTabHorizontalPadding = 8;
+constexpr int kChromeRefreshTabHorizontalPadding = 7;
// The standard tab width is 232 DIP, excluding separators and overlap.
@@ -104,11 +104,11 @@ int TabStyle::GetMinimumInactiveWidth()
-constexpr int kTabWidth = 232;
+constexpr int kTabWidth = 200;
+
+// Split tabs need more space to be readable
+constexpr int kSplitTabWidth = 250;
} // namespace
@@ -42,7 +45,7 @@ int TabStyle::GetStandardWidth(const boo
if (is_split) {
// Split tabs appear as half width with one bottom extension. They also must
// include half the tab overlap as the tabs fill the space between them.
- return kTabWidth / 2 + GetBottomCornerRadius() + GetTabOverlap() / 2;
+ return kSplitTabWidth / 2 + GetBottomCornerRadius() + GetTabOverlap() / 2;
} else {
// The full width includes two extensions with the bottom corner radius.
return kTabWidth + 2 * GetBottomCornerRadius();
@@ -104,11 +107,11 @@ int TabStyle::GetMinimumInactiveWidth()
}
int TabStyle::GetTopCornerRadius() const {
@@ -31,42 +48,6 @@
}
int TabStyle::GetTabOverlap() const {
--- a/chrome/browser/ui/views/tabs/tab_group_highlight.cc
+++ b/chrome/browser/ui/views/tabs/tab_group_highlight.cc
@@ -47,33 +47,7 @@ void TabGroupHighlight::OnPaint(gfx::Can
}
SkPath TabGroupHighlight::GetPath() const {
- // This path imitates the shape of a tab (see GM2TabStyle::GetPath()). It
- // doesn't reuse the exact same GetPath() function because it doesn't need
- // much of the complexity there. Group highlights only appear on group drag,
- // which is a well-scoped interaction. A dragging group doesn't nestle in with
- // the tabs around it, so there are no special cases needed when determining
- // its shape.
- const int corner_radius = TabStyle::Get()->GetBottomCornerRadius();
- const int top = GetLayoutConstant(TAB_STRIP_PADDING);
-
SkPath path;
- path.moveTo(0, bounds().height());
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
- SkPathDirection::kCCW, corner_radius,
- bounds().height() - corner_radius);
- path.lineTo(corner_radius, top + corner_radius);
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
- SkPathDirection::kCW, 2 * corner_radius, top);
- path.lineTo(bounds().width() - 2 * corner_radius, top);
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
- SkPathDirection::kCW, bounds().width() - corner_radius,
- top + corner_radius);
- path.lineTo(bounds().width() - corner_radius,
- bounds().height() - corner_radius);
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
- SkPathDirection::kCCW, bounds().width(), bounds().height());
- path.close();
-
return path;
}
--- a/chrome/browser/ui/views/tabs/tab_style_views.cc
+++ b/chrome/browser/ui/views/tabs/tab_style_views.cc
@@ -214,8 +214,6 @@ SkPath TabStyleViewsImpl::GetPath(TabSty
@@ -91,3 +72,27 @@
float top_left_corner_radius = content_corner_radius;
float top_right_corner_radius = content_corner_radius;
float bottom_left_corner_radius = content_corner_radius;
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -1161,9 +1161,7 @@ void Tab::UpdateIconVisibility() {
// left that needs to be considered.
const int close_button_width = GetLayoutConstant(TAB_CLOSE_BUTTON_SIZE) +
GetLayoutConstant(TAB_AFTER_TITLE_PADDING);
- const bool large_enough_for_close_button =
- available_width >= (touch_ui ? kTouchMinimumContentsWidthForCloseButtons
- : kMinimumContentsWidthForCloseButtons);
+ const bool large_enough_for_close_button = mouse_hovered_;
if (IsActive()) {
#if BUILDFLAG(IS_CHROMEOS)
@@ -1209,6 +1207,10 @@ void Tab::UpdateIconVisibility() {
large_enough_for_close_button;
if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-tab-close-buttons"))
showing_close_button_ = false;
+
+ if (closing_) {
+ showing_close_button_ = false;
+ }
if (showing_close_button_) {
available_width -= close_button_width;
}
@@ -0,0 +1,30 @@
--- a/chrome/browser/ui/views/profiles/avatar_toolbar_button_delegate.cc
+++ b/chrome/browser/ui/views/profiles/avatar_toolbar_button_delegate.cc
@@ -1753,7 +1753,7 @@ AvatarToolbarButtonDelegate::GetTextAndC
break;
}
case ButtonState::kNormal:
- color = color_provider->GetColor(kColorAvatarButtonHighlightNormal);
+ color = std::nullopt;
break;
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
case ButtonState::kHistorySyncOptin: {
@@ -1989,7 +1989,6 @@ ui::ImageModel AvatarToolbarButtonDelega
bool AvatarToolbarButtonDelegate::ShouldPaintBorder() const {
switch (state_manager_->GetButtonActiveState()) {
case ButtonState::kGuestSession:
- return true;
case ButtonState::kShowIdentityName:
case ButtonState::kNormal:
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
--- a/chrome/browser/profiles/profile_avatar_icon_util.cc
+++ b/chrome/browser/profiles/profile_avatar_icon_util.cc
@@ -436,7 +436,7 @@ ui::ImageModel GetGuestAvatar(int size)
if (base::FeatureList::IsEnabled(switches::kEnableImprovedGuestProfileMenu)) {
// Guest profiles generally use the default theme, no need to go through the
// `ThemeService`.
- color_id = ui::kColorSysPrimary;
+ color_id = ui::kColorMenuIcon;
vector_icon = &kAccountBoxIcon;
}
return ui::ImageModel::FromVectorIcon(*vector_icon, color_id, size);
+22
View File
@@ -31,3 +31,25 @@
SkPath path;
path.addRoundRect(gfx::RectToSkRect(rect), radii, radii);
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -1036,7 +1036,7 @@ void ToolbarView::LayoutCommon() {
views::ManualLayoutUtil(layout_manager_)
.SetViewHidden(toolbar_divider_, !extensions_container_->GetVisible());
const SkColor toolbar_extension_separator_color =
- GetColorProvider()->GetColor(kColorToolbarExtensionSeparatorEnabled);
+ GetColorProvider()->GetColor(kColorTabDividerFrameActive);
toolbar_divider_->SetBackground(views::CreateRoundedRectBackground(
toolbar_extension_separator_color,
GetLayoutConstant(TOOLBAR_DIVIDER_CORNER_RADIUS)));
--- a/chrome/browser/ui/views/toolbar/pinned_toolbar_actions_container.cc
+++ b/chrome/browser/ui/views/toolbar/pinned_toolbar_actions_container.cc
@@ -269,7 +269,7 @@ void PinnedToolbarActionsContainer::Upda
void PinnedToolbarActionsContainer::OnThemeChanged() {
const SkColor toolbar_divider_color =
- GetColorProvider()->GetColor(kColorToolbarExtensionSeparatorEnabled);
+ GetColorProvider()->GetColor(kColorTabDividerFrameActive);
toolbar_divider_->SetBackground(views::CreateRoundedRectBackground(
toolbar_divider_color, GetLayoutConstant(TOOLBAR_DIVIDER_CORNER_RADIUS)));
ToolbarIconContainerView::OnThemeChanged();
+48
View File
@@ -0,0 +1,48 @@
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -561,15 +561,7 @@ class ContentsSeparator : public views::
METADATA_HEADER(ContentsSeparator, views::View)
public:
- ContentsSeparator() {
- SetBackground(
- views::CreateSolidBackground(kColorToolbarContentAreaSeparator));
-
- // BrowserViewLayout will respect either the height or width of this,
- // depending on orientation, not simultaneously both.
- SetPreferredSize(
- gfx::Size(views::Separator::kThickness, views::Separator::kThickness));
- }
+ ContentsSeparator() {}
};
BEGIN_METADATA(ContentsSeparator)
@@ -833,8 +825,7 @@ class BrowserViewLayoutDelegateImpl : pu
// will enable BrowserViewLayout to hide the contents separator on its own
// using the same logic used by normal BrowserViews.
// The separator should not be shown when in split view.
- return !browser_view_->browser()->app_controller() &&
- !browser_view_->IsInSplitView();
+ return false;
}
bool IsInSplitView() const override { return browser_view_->IsInSplitView(); }
--- a/chrome/browser/ui/views/frame/top_container_background.cc
+++ b/chrome/browser/ui/views/frame/top_container_background.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
+#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "chrome/grit/theme_resources.h"
@@ -68,6 +69,7 @@ void TopContainerBackground::PaintBackgr
const BrowserView* browser_view) {
bool painted = PaintThemeCustomImage(canvas, view, browser_view);
if (!painted) {
- canvas->DrawColor(view->GetColorProvider()->GetColor(kColorToolbar));
+ canvas->DrawColor(browser_view->frame()->GetFrameView()->GetFrameColor(
+ BrowserFrameActiveState::kUseCurrent));
}
}
+3 -1
View File
@@ -176,7 +176,7 @@ helium/ui/omnibox-style.patch
helium/ui/app-menu-style.patch
helium/ui/fix-customize-side-panel.patch
helium/ui/adjust-immersive-padding.patch
helium/ui/adjust-side-panel-padding.patch
helium/ui/side-panel.patch
helium/ui/narrow-layout-provider.patch
helium/ui/app-menu-model.patch
helium/ui/remove-dead-toolbar-actions.patch
@@ -205,3 +205,5 @@ helium/ui/reduce-text-button-height.patch
helium/ui/fix-omnibox-tabs-icon.patch
helium/ui/smaller-window-grab-handle.patch
helium/ui/fix-pwa-toolbar.patch
helium/ui/top-container.patch
helium/ui/toolbar-avatar-button.patch
+1 -1
View File
@@ -1 +1 @@
6
8