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

Side by Side Diff: ui/native_theme/native_theme_aura.cc

Issue 11756005: Implement rough new dialog style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 years, 11 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 | « ash/shell.cc ('k') | ui/native_theme/native_theme_win.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 "ui/native_theme/native_theme_aura.h" 5 #include "ui/native_theme/native_theme_aura.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "grit/ui_resources.h" 8 #include "grit/ui_resources.h"
9 #include "ui/base/layout.h" 9 #include "ui/base/layout.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
11 #include "ui/gfx/image/image_skia.h" 11 #include "ui/gfx/image/image_skia.h"
12 #include "ui/gfx/rect.h" 12 #include "ui/gfx/rect.h"
13 #include "ui/gfx/size.h" 13 #include "ui/gfx/size.h"
14 #include "ui/gfx/skbitmap_operations.h" 14 #include "ui/gfx/skbitmap_operations.h"
15 #include "ui/native_theme/common_theme.h" 15 #include "ui/native_theme/common_theme.h"
16 16
17 namespace { 17 namespace {
18 18
19 const SkColor kMenuBackgroundColor = SK_ColorWHITE; 19 const SkColor kMenuBackgroundColor = SK_ColorWHITE;
20 20
21 // Theme colors returned by GetSystemColor(). 21 // Theme colors returned by GetSystemColor().
22 const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128); 22 const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128);
23 // Windows: 23 // Windows:
24 const SkColor kWindowBackgroundColor = SK_ColorWHITE; 24 const SkColor kWindowBackgroundColor = SK_ColorWHITE;
25 // Dialogs:
26 const SkColor kDialogBackgroundColor = SkColorSetRGB(251, 251, 251);
25 // FocusableBorder: 27 // FocusableBorder:
26 const SkColor kFocusedBorderColor = SkColorSetRGB(0x4D, 0x90, 0xFE); 28 const SkColor kFocusedBorderColor = SkColorSetRGB(0x4D, 0x90, 0xFE);
27 const SkColor kUnfocusedBorderColor = SkColorSetRGB(0xD9, 0xD9, 0xD9); 29 const SkColor kUnfocusedBorderColor = SkColorSetRGB(0xD9, 0xD9, 0xD9);
28 // TextButton: 30 // TextButton:
29 const SkColor kTextButtonBackgroundColor = SkColorSetRGB(0xDE, 0xDE, 0xDE); 31 const SkColor kTextButtonBackgroundColor = SkColorSetRGB(0xDE, 0xDE, 0xDE);
30 const SkColor kTextButtonEnabledColor = SkColorSetRGB(0x22, 0x22, 0x22); 32 const SkColor kTextButtonEnabledColor = SkColorSetRGB(0x22, 0x22, 0x22);
31 const SkColor kTextButtonDisabledColor = SkColorSetRGB(0x99, 0x99, 0x99); 33 const SkColor kTextButtonDisabledColor = SkColorSetRGB(0x99, 0x99, 0x99);
32 const SkColor kTextButtonHighlightColor = SkColorSetRGB(0, 0, 0); 34 const SkColor kTextButtonHighlightColor = SkColorSetRGB(0, 0, 0);
33 const SkColor kTextButtonHoverColor = kTextButtonEnabledColor; 35 const SkColor kTextButtonHoverColor = kTextButtonEnabledColor;
34 // MenuItem: 36 // MenuItem:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return color; 85 return color;
84 } 86 }
85 87
86 switch (color_id) { 88 switch (color_id) {
87 // Windows 89 // Windows
88 case kColorId_WindowBackground: 90 case kColorId_WindowBackground:
89 return kWindowBackgroundColor; 91 return kWindowBackgroundColor;
90 92
91 // Dialogs 93 // Dialogs
92 case kColorId_DialogBackground: 94 case kColorId_DialogBackground:
93 return kWindowBackgroundColor; 95 return kDialogBackgroundColor;
94 96
95 // FocusableBorder 97 // FocusableBorder
96 case kColorId_FocusedBorderColor: 98 case kColorId_FocusedBorderColor:
97 return kFocusedBorderColor; 99 return kFocusedBorderColor;
98 case kColorId_UnfocusedBorderColor: 100 case kColorId_UnfocusedBorderColor:
99 return kUnfocusedBorderColor; 101 return kUnfocusedBorderColor;
100 102
101 // TextButton 103 // TextButton
102 case kColorId_TextButtonBackgroundColor: 104 case kColorId_TextButtonBackgroundColor:
103 return kTextButtonBackgroundColor; 105 return kTextButtonBackgroundColor;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 DrawTiledImage(canvas, *center, 305 DrawTiledImage(canvas, *center,
304 0, 0, 1.0, 1.0, 306 0, 0, 1.0, 1.0,
305 rect.x() + left->width(), rect.y(), 307 rect.x() + left->width(), rect.y(),
306 rect.width() - left->width() - right->width(), 308 rect.width() - left->width() - right->width(),
307 center->height()); 309 center->height());
308 } 310 }
309 } 311 }
310 } 312 }
311 313
312 } // namespace ui 314 } // namespace ui
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698