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

Unified Diff: chrome/browser/ui/views/status_bubble_views.cc

Issue 792243002: ui: Bubble fix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/status_bubble_views.cc
diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc
index f52073768d9442026c85f0c004fea6dd206fce63..55f07c0d5767d0c7a3f8774be47869a039b2b4b3 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -400,13 +400,13 @@ void StatusBubbleViews::StatusView::OnPaint(gfx::Canvas* canvas) {
SkRRect rrect;
rrect.setRectRadii(RectToSkRect(rect), (const SkVector*)rad);
- canvas->sk_canvas()->drawRRect(rrect, paint);
+ canvas->sk_canvas()->drawRRect(rrect, shadow_paint);
+ const int shadow_size = 2 * kShadowThickness;
// Draw the bubble.
- rect.SetRect(SkIntToScalar(kShadowThickness),
- SkIntToScalar(kShadowThickness),
- SkIntToScalar(width),
- SkIntToScalar(height));
+ rect.SetRect(SkIntToScalar(kShadowThickness), SkIntToScalar(kShadowThickness),
+ SkIntToScalar(width - shadow_size),
+ SkIntToScalar(height - shadow_size));
rrect.setRectRadii(RectToSkRect(rect), (const SkVector*)rad);
canvas->sk_canvas()->drawRRect(rrect, paint);
@@ -414,10 +414,10 @@ void StatusBubbleViews::StatusView::OnPaint(gfx::Canvas* canvas) {
// is aligned to the right on RTL UIs, we mirror the text bounds if the
// locale is RTL.
const gfx::FontList font_list;
- int text_width = std::min(
- gfx::GetStringWidth(text_, font_list),
- width - (kShadowThickness * 2) - kTextPositionX - kTextHorizPadding);
- int text_height = height - (kShadowThickness * 2);
+ int text_width =
+ std::min(gfx::GetStringWidth(text_, font_list),
+ width - shadow_size - kTextPositionX - kTextHorizPadding);
+ int text_height = height - shadow_size;
gfx::Rect body_bounds(kShadowThickness + kTextPositionX,
kShadowThickness,
std::max(0, text_width),
« 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