diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 18:22:51 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 18:22:51 +0000 |
commit | 194ad1dd149ad2a577cd1a41ccfdd4a1fb7cd656 (patch) | |
tree | 8b71cea824e13b6fca3734642fdf83e56c7d47f7 /ui/views/controls/glow_hover_controller.cc | |
parent | 783eb300ba843d498bfb55076d81d45e77bb6fff (diff) | |
download | chromium_src-194ad1dd149ad2a577cd1a41ccfdd4a1fb7cd656.zip chromium_src-194ad1dd149ad2a577cd1a41ccfdd4a1fb7cd656.tar.gz chromium_src-194ad1dd149ad2a577cd1a41ccfdd4a1fb7cd656.tar.bz2 |
Tweaks for the launcher:
. App list and browser shortcut buttons can be moved around.
. Clicking the tabbed button cycles windows (creating a new one if
there isn't one).
BUG=110094
TEST=see bug
R=ben@chromium.org,jamescook@chromium.org
Review URL: http://codereview.chromium.org/9231030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118112 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/controls/glow_hover_controller.cc')
-rw-r--r-- | ui/views/controls/glow_hover_controller.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/views/controls/glow_hover_controller.cc b/ui/views/controls/glow_hover_controller.cc index 1306c88..24e5f40 100644 --- a/ui/views/controls/glow_hover_controller.cc +++ b/ui/views/controls/glow_hover_controller.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -69,7 +69,8 @@ void GlowHoverController::Draw(gfx::Canvas* canvas, return; // Draw a radial gradient to hover_canvas. - gfx::CanvasSkia hover_canvas(view_->size(), false); + gfx::CanvasSkia hover_canvas( + gfx::Size(mask_image.width(), mask_image.height()), false); // Draw a radial gradient to hover_canvas. int radius = view_->width() / 3; @@ -101,7 +102,8 @@ void GlowHoverController::Draw(gfx::Canvas* canvas, } SkBitmap result = SkBitmapOperations::CreateMaskedBitmap( hover_canvas.ExtractBitmap(), mask_image); - canvas->DrawBitmapInt(result, 0, 0); + canvas->DrawBitmapInt(result, (view_->width() - mask_image.width()) / 2, + (view_->height() - mask_image.height()) / 2); } void GlowHoverController::AnimationEnded(const ui::Animation* animation) { |