Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Tab separator becomes 1dp wide #1449

Merged
merged 1 commit into from
Jan 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions patches/chrome-browser-ui-views-tabs-tab_style.cc.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
diff --git a/chrome/browser/ui/views/tabs/tab_style.cc b/chrome/browser/ui/views/tabs/tab_style.cc
index 8f21aa7edbb3b0409c68e0d850541573710f993c..791e5dc1c2c161325990a43f0bb2d960d152e95a 100644
index 8f21aa7edbb3b0409c68e0d850541573710f993c..c77782443be84d1980cc36e54a89ed872807454d 100644
--- a/chrome/browser/ui/views/tabs/tab_style.cc
+++ b/chrome/browser/ui/views/tabs/tab_style.cc
@@ -128,7 +128,7 @@ class GM2TabStyle : public TabStyle {

// Thickness in DIPs of the separator painted on the left and right edges of
// the tab.
-constexpr int kSeparatorThickness = 1;
+constexpr int kSeparatorThickness = 2;

// Returns the radius of the outer corners of the tab shape.
int GetCornerRadius() {
@@ -144,7 +144,7 @@ int GetContentsHorizontalInsetSize() {

// Returns the height of the separator between tabs.
Expand All @@ -37,11 +28,14 @@ index 8f21aa7edbb3b0409c68e0d850541573710f993c..791e5dc1c2c161325990a43f0bb2d960
separator_size.width(), separator_size.height());

separator_bounds.trailing = separator_bounds.leading;
@@ -696,12 +697,13 @@ void GM2TabStyle::PaintSeparators(gfx::Canvas* canvas) const {
@@ -696,12 +697,16 @@ void GM2TabStyle::PaintSeparators(gfx::Canvas* canvas) const {
SK_AlphaOPAQUE));
};

+ const int separator_radius = separator_bounds.leading.width() / 2;
+ // Even if |separator_radius| becomes 1 native pixel the 'roundedness'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should avoid comments in patches. Any info should be in the commit message or PR and can be found with git blame

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok either way but just noting that I don't think it costs extra time to rebase because of it.

+ // will be approximated with color, although extremely subtle and
+ // likely only on screens >= 2x (i.e. separator width is 2+px)!
+ const int separator_radius = separator_bounds.leading.width() / 2;
cc::PaintFlags flags;
flags.setAntiAlias(true);
flags.setColor(separator_color(separator_opacities.left));
Expand Down