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

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

Issue 2375543003: Add SetProminent() to MdTextButton to create blue buttons. (Closed)
Patch Set: Fix nits. Created 4 years, 2 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
« no previous file with comments | « ui/native_theme/native_theme_mac.mm ('k') | ui/views/controls/button/md_text_button.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/native_theme/native_theme_win.h" 5 #include "ui/native_theme/native_theme_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <uxtheme.h> 9 #include <uxtheme.h>
10 #include <vsstyle.h> 10 #include <vsstyle.h>
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 // TODO: Obtain the correct colors using GetSysColor. 466 // TODO: Obtain the correct colors using GetSysColor.
467 // Dialogs: 467 // Dialogs:
468 const SkColor kDialogBackgroundColor = SkColorSetRGB(251, 251, 251); 468 const SkColor kDialogBackgroundColor = SkColorSetRGB(251, 251, 251);
469 // FocusableBorder: 469 // FocusableBorder:
470 const SkColor kFocusedBorderColor = SkColorSetRGB(0x4d, 0x90, 0xfe); 470 const SkColor kFocusedBorderColor = SkColorSetRGB(0x4d, 0x90, 0xfe);
471 const SkColor kUnfocusedBorderColor = SkColorSetRGB(0xd9, 0xd9, 0xd9); 471 const SkColor kUnfocusedBorderColor = SkColorSetRGB(0xd9, 0xd9, 0xd9);
472 // Button: 472 // Button:
473 const SkColor kButtonBackgroundColor = SkColorSetRGB(0xde, 0xde, 0xde); 473 const SkColor kButtonBackgroundColor = SkColorSetRGB(0xde, 0xde, 0xde);
474 const SkColor kButtonHighlightColor = SkColorSetARGB(200, 255, 255, 255); 474 const SkColor kButtonHighlightColor = SkColorSetARGB(200, 255, 255, 255);
475 const SkColor kButtonHoverColor = SkColorSetRGB(6, 45, 117); 475 const SkColor kButtonHoverColor = SkColorSetRGB(6, 45, 117);
476 const SkColor kCallToActionColorInvert = gfx::kGoogleBlue300; 476 const SkColor kProminentButtonColorInvert = gfx::kGoogleBlue300;
477 // MenuItem: 477 // MenuItem:
478 const SkColor kMenuSchemeHighlightBackgroundColorInvert = 478 const SkColor kMenuSchemeHighlightBackgroundColorInvert =
479 SkColorSetRGB(0x30, 0x30, 0x30); 479 SkColorSetRGB(0x30, 0x30, 0x30);
480 // Table: 480 // Table:
481 const SkColor kPositiveTextColor = SkColorSetRGB(0x0b, 0x80, 0x43); 481 const SkColor kPositiveTextColor = SkColorSetRGB(0x0b, 0x80, 0x43);
482 const SkColor kNegativeTextColor = SkColorSetRGB(0xc5, 0x39, 0x29); 482 const SkColor kNegativeTextColor = SkColorSetRGB(0xc5, 0x39, 0x29);
483 // Results Tables: 483 // Results Tables:
484 const SkColor kResultsTableUrlColor = 484 const SkColor kResultsTableUrlColor =
485 md ? gfx::kGoogleBlue700 : SkColorSetRGB(0x0b, 0x80, 0x43); 485 md ? gfx::kGoogleBlue700 : SkColorSetRGB(0x0b, 0x80, 0x43);
486 const SkColor kResultsTableSelectedUrlColor = SK_ColorWHITE; 486 const SkColor kResultsTableSelectedUrlColor = SK_ColorWHITE;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 return color_utils::GetReadableColor(kNegativeTextColor, 636 return color_utils::GetReadableColor(kNegativeTextColor,
637 system_colors_[COLOR_HIGHLIGHT]); 637 system_colors_[COLOR_HIGHLIGHT]);
638 default: 638 default:
639 break; 639 break;
640 } 640 }
641 641
642 if (color_utils::IsInvertedColorScheme()) { 642 if (color_utils::IsInvertedColorScheme()) {
643 switch (color_id) { 643 switch (color_id) {
644 case NativeTheme::kColorId_FocusedMenuItemBackgroundColor: 644 case NativeTheme::kColorId_FocusedMenuItemBackgroundColor:
645 return kMenuSchemeHighlightBackgroundColorInvert; 645 return kMenuSchemeHighlightBackgroundColorInvert;
646 case NativeTheme::kColorId_CallToActionColor: 646 case NativeTheme::kColorId_ProminentButtonColor:
647 return kCallToActionColorInvert; 647 return kProminentButtonColorInvert;
648 default: 648 default:
649 return color_utils::InvertColor(GetAuraColor(color_id, this)); 649 return color_utils::InvertColor(GetAuraColor(color_id, this));
650 } 650 }
651 } 651 }
652 652
653 return GetAuraColor(color_id, this); 653 return GetAuraColor(color_id, this);
654 } 654 }
655 655
656 void NativeThemeWin::PaintIndirect(SkCanvas* destination_canvas, 656 void NativeThemeWin::PaintIndirect(SkCanvas* destination_canvas,
657 HDC destination_hdc, 657 HDC destination_hdc,
(...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after
2072 break; 2072 break;
2073 case LAST: 2073 case LAST:
2074 NOTREACHED(); 2074 NOTREACHED();
2075 break; 2075 break;
2076 } 2076 }
2077 theme_handles_[theme_name] = handle; 2077 theme_handles_[theme_name] = handle;
2078 return handle; 2078 return handle;
2079 } 2079 }
2080 2080
2081 } // namespace ui 2081 } // namespace ui
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_mac.mm ('k') | ui/views/controls/button/md_text_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698