Skip to content

Commit

Permalink
[Tabs]: Increase opacity, decrease size of separator… (uplift to 1.69…
Browse files Browse the repository at this point in the history
….x) (#25363)

[Tabs]: Increase opacity, decrease size of separator, remove unused patch (#25353)

* [Tabs]: Increase opacity, decrease size of separator, remove unused patch

* Change color to 75% opacity after talking to @aguscruiz again

* Better height override

Co-authored-by: Jay Harris <jay.harris@outlook.co.nz>
  • Loading branch information
mkarolin and fallaciousreasoning authored Aug 28, 2024
1 parent 6138c0b commit 42e4a83
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion browser/ui/brave_layout_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ std::optional<int> GetBraveLayoutConstant(LayoutConstant constant) {
case LOCATION_BAR_CHILD_CORNER_RADIUS:
return 4;
case TAB_SEPARATOR_HEIGHT: {
return 24;
return 16;
}
case TOOLBAR_BUTTON_HEIGHT: {
return touch ? 48 : 28;
Expand Down
11 changes: 6 additions & 5 deletions browser/ui/color/brave_color_mixer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -906,11 +906,12 @@ void AddBravifiedTabStripColorMixer(ui::ColorProvider* provider,
mixer[kColorTabBackgroundActiveFrameInactive] = {
kColorTabBackgroundActiveFrameActive};

auto divider_color =
leo::GetColor(leo::Color::kColorDividerSubtle,
key.color_mode == ui::ColorProviderKey::ColorMode::kDark
? leo::Theme::kDark
: leo::Theme::kLight);
auto divider_color = ui::AlphaBlend(
{leo::GetColor(leo::Color::kColorDividerSubtle,
key.color_mode == ui::ColorProviderKey::ColorMode::kDark
? leo::Theme::kDark
: leo::Theme::kLight)},
{kColorTabBackgroundInactiveFrameActive}, 0.75 * 0xff);
mixer[kColorTabDividerFrameInactive] = {divider_color};
mixer[kColorTabDividerFrameActive] = {divider_color};
}
16 changes: 2 additions & 14 deletions patches/chrome-browser-ui-views-tabs-tab_style_views.cc.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/chrome/browser/ui/views/tabs/tab_style_views.cc b/chrome/browser/ui/views/tabs/tab_style_views.cc
index 65676013fece9815be2046fcbf554ca857ce896c..8a541ff9f709822fcec5612dd2839f641ad72e53 100644
index 65676013fece9..3d3c8a6c02e7d 100644
--- a/chrome/browser/ui/views/tabs/tab_style_views.cc
+++ b/chrome/browser/ui/views/tabs/tab_style_views.cc
@@ -138,6 +138,7 @@ class TabStyleViewsImpl : public TabStyleViews {
Expand All @@ -18,19 +18,7 @@ index 65676013fece9815be2046fcbf554ca857ce896c..8a541ff9f709822fcec5612dd2839f64

SkPath path;

@@ -668,9 +670,10 @@ TabStyle::SeparatorBounds TabStyleViewsImpl::GetSeparatorBounds(
TabStyle::SeparatorBounds separator_bounds;

const int extra_vertical_space =
+ 2 * (
aligned_bounds.height() -
(separator_size.height() + separator_margin.bottom() +
- separator_margin.top());
+ separator_margin.top()));

separator_bounds.leading = gfx::RectF(
aligned_bounds.x() + corner_radius - separator_margin.right() -
@@ -1042,14 +1045,18 @@ void TabStyleViewsImpl::PaintSeparators(gfx::Canvas* canvas) const {
@@ -1042,14 +1044,18 @@ void TabStyleViewsImpl::PaintSeparators(gfx::Canvas* canvas) const {
SK_AlphaOPAQUE));
};

Expand Down

0 comments on commit 42e4a83

Please sign in to comment.