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

Unified Diff: ui/app_list/app_list_bubble_border.cc

Issue 10566009: app_list: Fix shadow bleeds over launcher button and steals mouse events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix aura_demo compilation Created 8 years, 6 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 | « ui/app_list/app_list_bubble_border.h ('k') | ui/app_list/app_list_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/app_list_bubble_border.cc
diff --git a/ui/app_list/app_list_bubble_border.cc b/ui/app_list/app_list_bubble_border.cc
index ff1fd706ec7251a75ec6ba9f0f17f52b20f5385a..61e2ad16ce1b0ac3b4fcdc5748a825c0c78fff7f 100644
--- a/ui/app_list/app_list_bubble_border.cc
+++ b/ui/app_list/app_list_bubble_border.cc
@@ -8,6 +8,7 @@
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/gfx/canvas.h"
+#include "ui/gfx/path.h"
#include "ui/gfx/skia_util.h"
namespace {
@@ -124,7 +125,7 @@ AppListBubbleBorder::AppListBubbleBorder(views::View* app_list_view,
app_list_view_(app_list_view),
search_box_view_(search_box_view) {
const gfx::ShadowValue kShadows[] = {
- // Offset (0, 5), blur=8, color=0.36 black
+ // Offset (0, 5), blur=30, color=0.36 black
gfx::ShadowValue(gfx::Point(0, 5), 30, SkColorSetARGB(0x72, 0, 0, 0)),
};
shadows_.assign(kShadows, kShadows + arraysize(kShadows));
@@ -147,6 +148,21 @@ bool AppListBubbleBorder::ArrowOnLeftOrRight() const {
arrow_location() == views::BubbleBorder::RIGHT_BOTTOM;
}
+void AppListBubbleBorder::GetMask(const gfx::Rect& bounds,
+ gfx::Path* mask) const {
+ gfx::Insets insets;
+ GetInsets(&insets);
+
+ gfx::Rect content_bounds(bounds);
+ content_bounds.Inset(insets);
+
+ BuildShape(content_bounds,
+ arrow_location(),
+ SkIntToScalar(GetArrowOffset()),
+ SkIntToScalar(kBorderSize),
+ mask);
+}
+
int AppListBubbleBorder::GetArrowOffset() const {
if (ArrowAtTopOrBottom()) {
// Picks x offset and moves bubble arrow in the opposite direction.
« no previous file with comments | « ui/app_list/app_list_bubble_border.h ('k') | ui/app_list/app_list_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698