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

Side by Side Diff: ui/app_list/app_list_bubble_border.cc

Issue 10919076: app_list: Paint background for app item title. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nit Created 8 years, 3 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 | « ui/app_list/app_list.gyp ('k') | ui/app_list/app_list_constants.h » ('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 "ui/app_list/app_list_bubble_border.h" 5 #include "ui/app_list/app_list_bubble_border.h"
6 6
7 #include "third_party/skia/include/core/SkPath.h" 7 #include "third_party/skia/include/core/SkPath.h"
8 #include "third_party/skia/include/core/SkPaint.h" 8 #include "third_party/skia/include/core/SkPaint.h"
9 #include "third_party/skia/include/effects/SkGradientShader.h" 9 #include "third_party/skia/include/effects/SkGradientShader.h"
10 #include "ui/app_list/app_list_constants.h"
10 #include "ui/gfx/canvas.h" 11 #include "ui/gfx/canvas.h"
11 #include "ui/gfx/path.h" 12 #include "ui/gfx/path.h"
12 #include "ui/gfx/skia_util.h" 13 #include "ui/gfx/skia_util.h"
13 14
14 namespace { 15 namespace {
15 16
16 const SkColor kSearchBoxBackground = SK_ColorWHITE; 17 const SkColor kSearchBoxBackground = SK_ColorWHITE;
17 const SkColor kContentsBackground = SkColorSetRGB(0xF5, 0xF5, 0xF5);
18 18
19 // Colors and sizes of top separator between searchbox and grid view. 19 // Colors and sizes of top separator between searchbox and grid view.
20 const SkColor kTopSeparatorColor = SkColorSetRGB(0xF0, 0xF0, 0xF0); 20 const SkColor kTopSeparatorColor = SkColorSetRGB(0xF0, 0xF0, 0xF0);
21 const int kTopSeparatorSize = 1; 21 const int kTopSeparatorSize = 1;
22 22
23 } // namespace 23 } // namespace
24 24
25 namespace app_list { 25 namespace app_list {
26 26
27 AppListBubbleBorder::AppListBubbleBorder(views::View* app_list_view, 27 AppListBubbleBorder::AppListBubbleBorder(views::View* app_list_view,
(...skipping 23 matching lines...) Expand all
51 gfx::Rect seperator_rect(search_box_rect); 51 gfx::Rect seperator_rect(search_box_rect);
52 seperator_rect.set_y(seperator_rect.bottom()); 52 seperator_rect.set_y(seperator_rect.bottom());
53 seperator_rect.set_height(kTopSeparatorSize); 53 seperator_rect.set_height(kTopSeparatorSize);
54 canvas->FillRect(seperator_rect, kTopSeparatorColor); 54 canvas->FillRect(seperator_rect, kTopSeparatorColor);
55 55
56 gfx::Rect contents_rect(bounds.x(), 56 gfx::Rect contents_rect(bounds.x(),
57 seperator_rect.bottom(), 57 seperator_rect.bottom(),
58 bounds.width(), 58 bounds.width(),
59 bounds.bottom() - seperator_rect.bottom()); 59 bounds.bottom() - seperator_rect.bottom());
60 60
61 paint.setColor(kContentsBackground); 61 paint.setColor(kContentsBackgroundColor);
62 canvas->DrawRect(contents_rect, paint); 62 canvas->DrawRect(contents_rect, paint);
63 } 63 }
64 64
65 } // namespace app_list 65 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list.gyp ('k') | ui/app_list/app_list_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698