Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: chrome/browser/ui/views/tabs/tab.cc

Issue 1587873004: Tone down the hover effect on mousing over background tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/controls/glow_hover_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab.cc
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index 8313719bd8881a6c1db6df5af3d1ee5abd372b52..cd8f0e8a2dd249be41553f06db7e3c312c04af51 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -1343,9 +1343,10 @@ void Tab::PaintTabBackgroundUsingFillId(gfx::Canvas* canvas,
// position within the frame background image.
const int x_offset = GetMirroredX() + background_offset_.x();
- const SkScalar radius = SkFloatToScalar(width() / 3.f);
- const bool draw_hover =
- !is_active && hover_controller_.ShouldDraw() && radius > 0;
+ const SkScalar kMinHoverRadius = 16;
+ const SkScalar radius =
+ std::max(SkFloatToScalar(width() / 4.f), kMinHoverRadius);
+ const bool draw_hover = !is_active && hover_controller_.ShouldDraw();
SkPoint hover_location(PointToSkPoint(hover_controller_.location()));
const SkAlpha hover_alpha = hover_controller_.GetAlpha();
« no previous file with comments | « no previous file | ui/views/controls/glow_hover_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698