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

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

Issue 2473863004: Remove MaterialDesignController::IsModeMaterial (Closed)
Patch Set: pkasting review and rebase Created 4 years, 1 month 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_dark_win.cc ('k') | no next file » | 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 PaintWindowResizeGripper(hdc, rect); 476 PaintWindowResizeGripper(hdc, rect);
477 return; 477 return;
478 case kSliderTrack: 478 case kSliderTrack:
479 case kSliderThumb: 479 case kSliderThumb:
480 case kMaxPart: 480 case kMaxPart:
481 NOTREACHED(); 481 NOTREACHED();
482 } 482 }
483 } 483 }
484 484
485 SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const { 485 SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const {
486 const bool md = ui::MaterialDesignController::IsModeMaterial();
487 if (!md) {
488 // Link:
489 const SkColor kLinkPressedColor = SkColorSetRGB(200, 0, 0);
490
491 switch (color_id) {
492 // Link
493 case kColorId_LinkDisabled:
494 return system_colors_[COLOR_WINDOWTEXT];
495 case kColorId_LinkEnabled:
496 return system_colors_[COLOR_HOTLIGHT];
497 case kColorId_LinkPressed:
498 return kLinkPressedColor;
499
500 default:
501 break;
502 }
503 }
504
505 // TODO: Obtain the correct colors using GetSysColor. 486 // TODO: Obtain the correct colors using GetSysColor.
506 // Dialogs: 487 // Dialogs:
507 const SkColor kDialogBackgroundColor = SkColorSetRGB(251, 251, 251); 488 const SkColor kDialogBackgroundColor = SkColorSetRGB(251, 251, 251);
508 // FocusableBorder: 489 // FocusableBorder:
509 const SkColor kFocusedBorderColor = SkColorSetRGB(0x4d, 0x90, 0xfe); 490 const SkColor kFocusedBorderColor = SkColorSetRGB(0x4d, 0x90, 0xfe);
510 const SkColor kUnfocusedBorderColor = SkColorSetRGB(0xd9, 0xd9, 0xd9); 491 const SkColor kUnfocusedBorderColor = SkColorSetRGB(0xd9, 0xd9, 0xd9);
511 // Button: 492 // Button:
512 const SkColor kButtonHoverColor = SkColorSetRGB(6, 45, 117); 493 const SkColor kButtonHoverColor = SkColorSetRGB(6, 45, 117);
513 const SkColor kProminentButtonColorInvert = gfx::kGoogleBlue300; 494 const SkColor kProminentButtonColorInvert = gfx::kGoogleBlue300;
514 // MenuItem: 495 // MenuItem:
515 const SkColor kMenuSchemeHighlightBackgroundColorInvert = 496 const SkColor kMenuSchemeHighlightBackgroundColorInvert =
516 SkColorSetRGB(0x30, 0x30, 0x30); 497 SkColorSetRGB(0x30, 0x30, 0x30);
517 // Table: 498 // Table:
518 const SkColor kPositiveTextColor = SkColorSetRGB(0x0b, 0x80, 0x43); 499 const SkColor kPositiveTextColor = SkColorSetRGB(0x0b, 0x80, 0x43);
519 const SkColor kNegativeTextColor = SkColorSetRGB(0xc5, 0x39, 0x29); 500 const SkColor kNegativeTextColor = SkColorSetRGB(0xc5, 0x39, 0x29);
520 // Results Tables: 501 // Results Tables:
521 const SkColor kResultsTableUrlColor = 502 const SkColor kResultsTableUrlColor = gfx::kGoogleBlue700;
522 md ? gfx::kGoogleBlue700 : SkColorSetRGB(0x0b, 0x80, 0x43);
523 const SkColor kResultsTableSelectedUrlColor = SK_ColorWHITE; 503 const SkColor kResultsTableSelectedUrlColor = SK_ColorWHITE;
524 // Label: 504 // Label:
525 const SkColor kLabelTextSelectionBackgroundFocusedColor = gfx::kGoogleBlue700; 505 const SkColor kLabelTextSelectionBackgroundFocusedColor = gfx::kGoogleBlue700;
526 506
527 switch (color_id) { 507 switch (color_id) {
528 // Windows 508 // Windows
529 case kColorId_WindowBackground: 509 case kColorId_WindowBackground:
530 return system_colors_[COLOR_WINDOW]; 510 return system_colors_[COLOR_WINDOW];
531 511
532 // Dialogs 512 // Dialogs
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 break; 2102 break;
2123 case LAST: 2103 case LAST:
2124 NOTREACHED(); 2104 NOTREACHED();
2125 break; 2105 break;
2126 } 2106 }
2127 theme_handles_[theme_name] = handle; 2107 theme_handles_[theme_name] = handle;
2128 return handle; 2108 return handle;
2129 } 2109 }
2130 2110
2131 } // namespace ui 2111 } // namespace ui
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_dark_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698