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

Side by Side Diff: ash/system/tray/tray_bubble_view.cc

Issue 10830078: Uber tray UI Polish: Adjust uber tray bubble and arrow to align it with the app list bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/system/tray/tray_constants.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/tray/tray_bubble_view.h" 5 #include "ash/system/tray/tray_bubble_view.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/system/tray/tray_constants.h" 9 #include "ash/system/tray/tray_constants.h"
10 #include "ash/wm/shelf_layout_manager.h" 10 #include "ash/wm/shelf_layout_manager.h"
(...skipping 15 matching lines...) Expand all
26 26
27 namespace ash { 27 namespace ash {
28 28
29 namespace { 29 namespace {
30 30
31 const int kShadowThickness = 4; 31 const int kShadowThickness = 4;
32 const int kBottomLineHeight = 1; 32 const int kBottomLineHeight = 1;
33 const int kSystemTrayBubbleHorizontalInset = 1; 33 const int kSystemTrayBubbleHorizontalInset = 1;
34 const int kSystemTrayBubbleVerticalInset = 1; 34 const int kSystemTrayBubbleVerticalInset = 1;
35 35
36 const int kArrowHeight = 10; 36 const int kArrowHeight = 9;
37 const int kArrowWidth = 20; 37 const int kArrowWidth = 19;
38 38
39 // Inset the arrow a bit from the edge. 39 // Inset the arrow a bit from the edge.
40 const int kArrowMinOffset = kArrowWidth / 2 + 4; 40 const int kArrowMinOffset = kArrowWidth / 2 + 4;
41 41
42 const SkColor kShadowColor = SkColorSetARGB(0xff, 0, 0, 0); 42 const SkColor kShadowColor = SkColorSetARGB(0xff, 0, 0, 0);
43 43
44 void DrawBlurredShadowAroundView(gfx::Canvas* canvas, 44 void DrawBlurredShadowAroundView(gfx::Canvas* canvas,
45 int top, 45 int top,
46 int bottom, 46 int bottom,
47 int width, 47 int width,
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 path.moveTo(SkIntToScalar(top_base_x), SkIntToScalar(top_base_y)); 181 path.moveTo(SkIntToScalar(top_base_x), SkIntToScalar(top_base_y));
182 path.lineTo(SkIntToScalar(tip_x), SkIntToScalar(tip_y)); 182 path.lineTo(SkIntToScalar(tip_x), SkIntToScalar(tip_y));
183 path.lineTo(SkIntToScalar(top_base_x), 183 path.lineTo(SkIntToScalar(top_base_x),
184 SkIntToScalar(top_base_y + kArrowWidth)); 184 SkIntToScalar(top_base_y + kArrowWidth));
185 } 185 }
186 186
187 views::Background* background = FindAppropriateBackground(owner_, 187 views::Background* background = FindAppropriateBackground(owner_,
188 arrow_reference); 188 arrow_reference);
189 189
190 SkPaint paint; 190 SkPaint paint;
191 paint.setAntiAlias(true);
191 paint.setStyle(SkPaint::kFill_Style); 192 paint.setStyle(SkPaint::kFill_Style);
192 paint.setColor(background ? background->get_color() : kBackgroundColor); 193 paint.setColor(background ? background->get_color() : kBackgroundColor);
193 canvas->DrawPath(path, paint); 194 canvas->DrawPath(path, paint);
194 195
195 // Now draw the arrow border. 196 // Now draw the arrow border.
196 paint.setStyle(SkPaint::kStroke_Style); 197 paint.setStyle(SkPaint::kStroke_Style);
197 paint.setColor(kBorderDarkColor); 198 paint.setColor(kBorderDarkColor);
198 canvas->DrawPath(path, paint); 199 canvas->DrawPath(path, paint);
199 200
200 } 201 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 return; 388 return;
388 } 389 }
389 // Handle clicking outside the bubble and tray. We don't block the event, so 390 // Handle clicking outside the bubble and tray. We don't block the event, so
390 // it will also be handled by whatever widget was clicked on. 391 // it will also be handled by whatever widget was clicked on.
391 OnClickedOutsideView(); 392 OnClickedOutsideView();
392 } 393 }
393 394
394 395
395 } // namespace internal 396 } // namespace internal
396 } // namespace ash 397 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/tray/tray_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698