OLD | NEW |
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 // For WinDDK ATL compatibility, these ATL headers must come first. | 5 // For WinDDK ATL compatibility, these ATL headers must come first. |
6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
7 | 7 |
8 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
9 #include <atlbase.h> // NOLINT | 9 #include <atlbase.h> // NOLINT |
10 #include <atlwin.h> // NOLINT | 10 #include <atlwin.h> // NOLINT |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 NativeTheme::kColorId_ResultsTablePositiveSelectedText}, | 121 NativeTheme::kColorId_ResultsTablePositiveSelectedText}, |
122 gfx::INFERIOR}; | 122 gfx::INFERIOR}; |
123 case SuggestionAnswer::PERSONALIZED_SUGGESTION: | 123 case SuggestionAnswer::PERSONALIZED_SUGGESTION: |
124 return {ui::ResourceBundle::BaseFont, | 124 return {ui::ResourceBundle::BaseFont, |
125 {NativeTheme::kColorId_ResultsTableNormalText, | 125 {NativeTheme::kColorId_ResultsTableNormalText, |
126 NativeTheme::kColorId_ResultsTableHoveredText, | 126 NativeTheme::kColorId_ResultsTableHoveredText, |
127 NativeTheme::kColorId_ResultsTableSelectedText}, | 127 NativeTheme::kColorId_ResultsTableSelectedText}, |
128 gfx::NORMAL_BASELINE}; | 128 gfx::NORMAL_BASELINE}; |
129 case SuggestionAnswer::ANSWER_TEXT_MEDIUM: | 129 case SuggestionAnswer::ANSWER_TEXT_MEDIUM: |
130 return {ui::ResourceBundle::BaseFont, | 130 return {ui::ResourceBundle::BaseFont, |
131 {NativeTheme::kColorId_ResultsTableNormalText, | 131 {NativeTheme::kColorId_ResultsTableNormalDimmedText, |
132 NativeTheme::kColorId_ResultsTableHoveredText, | 132 NativeTheme::kColorId_ResultsTableHoveredDimmedText, |
133 NativeTheme::kColorId_ResultsTableSelectedText}, | 133 NativeTheme::kColorId_ResultsTableSelectedDimmedText}, |
134 gfx::NORMAL_BASELINE}; | 134 gfx::NORMAL_BASELINE}; |
135 case SuggestionAnswer::ANSWER_TEXT_LARGE: | 135 case SuggestionAnswer::ANSWER_TEXT_LARGE: |
136 return {ui::ResourceBundle::LargeFont, | 136 return {ui::ResourceBundle::LargeFont, |
137 {NativeTheme::kColorId_ResultsTableNormalText, | 137 {NativeTheme::kColorId_ResultsTableNormalDimmedText, |
138 NativeTheme::kColorId_ResultsTableHoveredText, | 138 NativeTheme::kColorId_ResultsTableHoveredDimmedText, |
139 NativeTheme::kColorId_ResultsTableSelectedText}, | 139 NativeTheme::kColorId_ResultsTableSelectedDimmedText}, |
140 gfx::NORMAL_BASELINE}; | 140 gfx::NORMAL_BASELINE}; |
141 case SuggestionAnswer::SUGGESTION_SECONDARY_TEXT_SMALL: | 141 case SuggestionAnswer::SUGGESTION_SECONDARY_TEXT_SMALL: |
142 return {ui::ResourceBundle::LargeFont, | 142 return {ui::ResourceBundle::LargeFont, |
143 {NativeTheme::kColorId_ResultsTableNormalDimmedText, | 143 {NativeTheme::kColorId_ResultsTableNormalDimmedText, |
144 NativeTheme::kColorId_ResultsTableHoveredDimmedText, | 144 NativeTheme::kColorId_ResultsTableHoveredDimmedText, |
145 NativeTheme::kColorId_ResultsTableSelectedDimmedText}, | 145 NativeTheme::kColorId_ResultsTableSelectedDimmedText}, |
146 gfx::INFERIOR}; | 146 gfx::INFERIOR}; |
147 case SuggestionAnswer::SUGGESTION_SECONDARY_TEXT_MEDIUM: | 147 case SuggestionAnswer::SUGGESTION_SECONDARY_TEXT_MEDIUM: |
148 return {ui::ResourceBundle::BaseFont, | 148 return {ui::ResourceBundle::BaseFont, |
149 {NativeTheme::kColorId_ResultsTableNormalDimmedText, | 149 {NativeTheme::kColorId_ResultsTableNormalDimmedText, |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 destination->AppendText(text); | 796 destination->AppendText(text); |
797 const TextStyle& text_style = GetTextStyle(text_type); | 797 const TextStyle& text_style = GetTextStyle(text_type); |
798 // TODO(dschuyler): follow up on the problem of different font sizes within | 798 // TODO(dschuyler): follow up on the problem of different font sizes within |
799 // one RenderText. Maybe with destination->SetFontList(...). | 799 // one RenderText. Maybe with destination->SetFontList(...). |
800 destination->ApplyWeight( | 800 destination->ApplyWeight( |
801 is_bold ? gfx::Font::Weight::BOLD : gfx::Font::Weight::NORMAL, range); | 801 is_bold ? gfx::Font::Weight::BOLD : gfx::Font::Weight::NORMAL, range); |
802 destination->ApplyColor( | 802 destination->ApplyColor( |
803 GetNativeTheme()->GetSystemColor(text_style.colors[GetState()]), range); | 803 GetNativeTheme()->GetSystemColor(text_style.colors[GetState()]), range); |
804 destination->ApplyBaselineStyle(text_style.baseline, range); | 804 destination->ApplyBaselineStyle(text_style.baseline, range); |
805 } | 805 } |
OLD | NEW |