Chromium Code Reviews| 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..ecab26bacf1ccc4333faa5a8adce65fa6444e62e 100644 |
| --- a/ash/system/tray/system_tray.cc |
| +++ b/ash/system/tray/system_tray.cc |
| @@ -217,27 +217,33 @@ 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); |
| + internal::ShelfLayoutManager* shelf = Shell::GetInstance()->shelf(); |
| + if (shelf->visibility_state() == internal::ShelfLayoutManager::VISIBLE || |
| + (shelf->visibility_state() == internal::ShelfLayoutManager::AUTO_HIDE && |
| + shelf->auto_hide_state() == |
| + internal::ShelfLayoutManager::AUTO_HIDE_SHOWN)) { |
|
sadrul
2012/03/28 05:38:47
Is there a better way of determining if the tray/s
sky
2012/03/28 15:31:11
No. I'm not opposed to you adding a method is_visi
|
| + // 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 { |