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

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

Issue 795933009: [AiS] for desktop, two lines and font sytles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using RGB macros for GTK colors Created 5 years, 9 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
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 <uxtheme.h> 8 #include <uxtheme.h>
9 #include <vsstyle.h> 9 #include <vsstyle.h>
10 #include <vssym32.h> 10 #include <vssym32.h>
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 case kColorId_ResultsTableNormalDivider: 634 case kColorId_ResultsTableNormalDivider:
635 return color_utils::AlphaBlend(system_colors_[COLOR_WINDOWTEXT], 635 return color_utils::AlphaBlend(system_colors_[COLOR_WINDOWTEXT],
636 system_colors_[COLOR_WINDOW], 0x34); 636 system_colors_[COLOR_WINDOW], 0x34);
637 case kColorId_ResultsTableHoveredDivider: 637 case kColorId_ResultsTableHoveredDivider:
638 return color_utils::AlphaBlend( 638 return color_utils::AlphaBlend(
639 system_colors_[COLOR_WINDOWTEXT], 639 system_colors_[COLOR_WINDOWTEXT],
640 GetSystemColor(kColorId_ResultsTableHoveredBackground), 0x34); 640 GetSystemColor(kColorId_ResultsTableHoveredBackground), 0x34);
641 case kColorId_ResultsTableSelectedDivider: 641 case kColorId_ResultsTableSelectedDivider:
642 return color_utils::AlphaBlend(system_colors_[COLOR_HIGHLIGHTTEXT], 642 return color_utils::AlphaBlend(system_colors_[COLOR_HIGHLIGHTTEXT],
643 system_colors_[COLOR_HIGHLIGHT], 0x34); 643 system_colors_[COLOR_HIGHLIGHT], 0x34);
644 case kColorId_ResultsTablePositiveText:
645 case kColorId_ResultsTablePositiveHoveredText:
646 return color_utils::GetReadableColor(SkColorSetRGB(0, 255, 0),
Peter Kasting 2015/03/17 22:01:45 Nit: Use SK_ColorGREEN here (and RED below). Thes
dschuyler 2015/03/17 22:57:55 Done.
647 system_colors_[COLOR_WINDOW]);
Peter Kasting 2015/03/17 22:01:45 The "Hovered" text states should be computed atop
dschuyler 2015/03/17 22:57:55 Done.
648 case kColorId_ResultsTablePositiveSelectedText:
649 return color_utils::GetReadableColor(SkColorSetRGB(0, 255, 0),
650 system_colors_[COLOR_HIGHLIGHT]);
651 case kColorId_ResultsTableNegativeText:
652 case kColorId_ResultsTableNegativeHoveredText:
653 return color_utils::GetReadableColor(SkColorSetRGB(255, 0, 0),
654 system_colors_[COLOR_WINDOW]);
655 case kColorId_ResultsTableNegativeSelectedText:
656 return color_utils::GetReadableColor(SkColorSetRGB(255, 0, 0),
657 system_colors_[COLOR_HIGHLIGHT]);
644 } 658 }
645 NOTREACHED(); 659 NOTREACHED();
646 return kInvalidColorIdColor; 660 return kInvalidColorIdColor;
647 } 661 }
648 662
649 void NativeThemeWin::PaintIndirect(SkCanvas* canvas, 663 void NativeThemeWin::PaintIndirect(SkCanvas* canvas,
650 Part part, 664 Part part,
651 State state, 665 State state,
652 const gfx::Rect& rect, 666 const gfx::Rect& rect,
653 const ExtraParams& extra) const { 667 const ExtraParams& extra) const {
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
2059 break; 2073 break;
2060 case LAST: 2074 case LAST:
2061 NOTREACHED(); 2075 NOTREACHED();
2062 break; 2076 break;
2063 } 2077 }
2064 theme_handles_[theme_name] = handle; 2078 theme_handles_[theme_name] = handle;
2065 return handle; 2079 return handle;
2066 } 2080 }
2067 2081
2068 } // namespace ui 2082 } // namespace ui
OLDNEW
« ui/native_theme/native_theme.h ('K') | « ui/native_theme/native_theme.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698