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

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

Issue 6250011: Adding in a constant for hover slide opacity so that the hover is more visibl... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab.cc
===================================================================
--- chrome/browser/ui/views/tabs/tab.cc (revision 71648)
+++ chrome/browser/ui/views/tabs/tab.cc (working copy)
@@ -52,6 +52,7 @@
// How opaque to make the hover state (out of 1).
static const double kHoverOpacity = 0.33;
+static const double kHoverSlideOpacity = 0.5;
Tab::TabImage Tab::tab_alpha_ = {0};
Tab::TabImage Tab::tab_active_ = {0};
@@ -503,7 +504,8 @@
canvas->DrawBitmapInt(background_canvas.ExtractBitmap(), 0, 0);
if (!GetThemeProvider()->HasCustomImage(tab_id) &&
- hover_animation() && hover_animation()->IsShowing()) {
+ hover_animation() &&
+ (hover_animation()->IsShowing() || hover_animation()->is_animating() )) {
sky 2011/01/19 02:36:33 nuke the space between is_animating() and )
SkBitmap hover_glow = DrawHoverGlowBitmap(width(), height());
// Draw the hover glow clipped to the background into hover_image.
SkBitmap hover_image = SkBitmapOperations::CreateMaskedBitmap(
@@ -580,8 +582,8 @@
const ui::SlideAnimation* hover_slide = hover_animation();
int hover_alpha = 0;
if (hover_slide) {
- hover_alpha =
- static_cast<int>(255 * kHoverOpacity * hover_slide->GetCurrentValue());
+ hover_alpha = static_cast<int>(255 * kHoverSlideOpacity *
+ hover_slide->GetCurrentValue());
}
colors[0] = SkColorSetARGB(hover_alpha, 255, 255, 255);
colors[1] = SkColorSetARGB(0, 255, 255, 255);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698