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

Unified Diff: ash/system/tray/system_tray.cc

Issue 9873020: ash: Do not show the arrow in the tray bubbles when the tray isn't visible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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 | ash/wm/shelf_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index 6a2bd0202228f040d0e780d0d625e1ebc8a5bf3c..c33fe5a97d04444b5909e72a5acb20ed7ac9104b 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -217,27 +217,29 @@ class SystemTrayBubbleBorder : public views::Border {
owner_->width() - kShadowOffset, kShadowHeight),
kShadowColor);
- // Draw the arrow.
- int left_base_x = owner_->width() - kArrowPaddingFromRight - kArrowWidth;
- int left_base_y = y;
- int tip_x = left_base_x + kArrowWidth / 2;
- int tip_y = left_base_y + kArrowHeight;
- SkPath path;
- path.incReserve(4);
- path.moveTo(SkIntToScalar(left_base_x), SkIntToScalar(left_base_y));
- path.lineTo(SkIntToScalar(tip_x), SkIntToScalar(tip_y));
- path.lineTo(SkIntToScalar(left_base_x + kArrowWidth),
- SkIntToScalar(left_base_y));
-
- SkPaint paint;
- paint.setStyle(SkPaint::kFill_Style);
- paint.setColor(kBackgroundColor);
- canvas->sk_canvas()->drawPath(path, paint);
-
- // Now the draw the outline.
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setColor(kBorderDarkColor);
- canvas->sk_canvas()->drawPath(path, paint);
+ if (Shell::GetInstance()->shelf()->IsVisible()) {
+ // Draw the arrow.
+ int left_base_x = owner_->width() - kArrowPaddingFromRight - kArrowWidth;
+ int left_base_y = y;
+ int tip_x = left_base_x + kArrowWidth / 2;
+ int tip_y = left_base_y + kArrowHeight;
+ SkPath path;
+ path.incReserve(4);
+ path.moveTo(SkIntToScalar(left_base_x), SkIntToScalar(left_base_y));
+ path.lineTo(SkIntToScalar(tip_x), SkIntToScalar(tip_y));
+ path.lineTo(SkIntToScalar(left_base_x + kArrowWidth),
+ SkIntToScalar(left_base_y));
+
+ SkPaint paint;
+ paint.setStyle(SkPaint::kFill_Style);
+ paint.setColor(kBackgroundColor);
+ canvas->sk_canvas()->drawPath(path, paint);
+
+ // Now the draw the outline.
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setColor(kBorderDarkColor);
+ canvas->sk_canvas()->drawPath(path, paint);
+ }
}
virtual void GetInsets(gfx::Insets* insets) const OVERRIDE {
« no previous file with comments | « no previous file | ash/wm/shelf_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698