Chromium Code Reviews| Index: chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc |
| diff --git a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc |
| index 3dec05e03c2df7ed5ca6e361999b24e5561e8570..91e71a44c3ec2ea09ba527376894bff316a1e94e 100644 |
| --- a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc |
| +++ b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc |
| @@ -373,11 +373,84 @@ GdkColor NativeThemeGtk2::GetSystemGdkColor(ColorId color_id) const { |
| return GdkAlphaBlend(win_style->text[GTK_STATE_SELECTED], |
| win_style->bg[GTK_STATE_SELECTED], 0x34); |
| } |
| + |
| + // Answers |
| + case kColorId_AnswerNormalText: |
| + return GetEntryStyle()->text[GTK_STATE_NORMAL]; |
| + case kColorId_AnswerNormalTextHovered: |
| + return GetEntryStyle()->text[GTK_STATE_PRELIGHT]; |
| + case kColorId_AnswerNormalTextSelected: |
| + return GetEntryStyle()->text[GTK_STATE_SELECTED]; |
| + case kColorId_AnswerInfoText: { |
| + GtkStyle* entry_style = GetEntryStyle(); |
| + return GdkAlphaBlend(entry_style->text[GTK_STATE_NORMAL], |
| + entry_style->base[GTK_STATE_NORMAL], 0x80); |
| + } |
| + case kColorId_AnswerInfoTextHovered: { |
| + GtkStyle* entry_style = GetEntryStyle(); |
| + return GdkAlphaBlend(entry_style->text[GTK_STATE_PRELIGHT], |
| + entry_style->base[GTK_STATE_PRELIGHT], 0x80); |
| + } |
| + case kColorId_AnswerInfoTextSelected: { |
| + GtkStyle* entry_style = GetEntryStyle(); |
| + return GdkAlphaBlend(entry_style->text[GTK_STATE_SELECTED], |
| + entry_style->base[GTK_STATE_SELECTED], 0x80); |
| + } |
| + case kColorId_AnswerLinkText: { |
| + GdkColor color = {0}; |
| + color.blue = ~0; |
| + return color; |
| + } |
| + case kColorId_AnswerLinkTextHovered: { |
| + GdkColor color = {0}; |
| + color.blue = ~0; |
| + GtkStyle* entry_style = GetEntryStyle(); |
| + return GdkAlphaBlend(color, entry_style->base[GTK_STATE_SELECTED], 0x80); |
| + } |
| + case kColorId_AnswerLinkTextSelected: { |
| + GdkColor color = {0}; |
| + color.blue = ~0; |
| + GtkStyle* entry_style = GetEntryStyle(); |
| + return GdkAlphaBlend(color, entry_style->base[GTK_STATE_SELECTED], 0x80); |
| + } |
| + case kColorId_AnswerPositiveText: { |
| + GdkColor color = {0}; |
| + color.green = ~0; |
| + return color; |
| + } |
| + case kColorId_AnswerPositiveTextHovered: { |
| + GdkColor color = {0}; |
| + color.green = ~0; |
| + GtkStyle* entry_style = GetEntryStyle(); |
| + return GdkAlphaBlend(color, entry_style->base[GTK_STATE_PRELIGHT], 0x80); |
| + } |
| + case kColorId_AnswerPositiveTextSelected: { |
| + GdkColor color = {0}; |
| + color.green = ~0; |
| + GtkStyle* entry_style = GetEntryStyle(); |
| + return GdkAlphaBlend(color, entry_style->base[GTK_STATE_SELECTED], 0x80); |
| + } |
| + case kColorId_AnswerNegativeText: { |
| + GdkColor color = {0}; |
| + color.red = ~0; |
| + return color; |
| + } |
| + case kColorId_AnswerNegativeTextHovered: { |
| + GdkColor color = {0}; |
| + color.red = ~0; |
| + GtkStyle* entry_style = GetEntryStyle(); |
| + return GdkAlphaBlend(color, entry_style->base[GTK_STATE_PRELIGHT], 0x80); |
| + } |
| + case kColorId_AnswerNegativeTextSelected: { |
| + GdkColor color = {0}; |
| + color.red = ~0; |
| + GtkStyle* entry_style = GetEntryStyle(); |
| + return GdkAlphaBlend(color, entry_style->base[GTK_STATE_SELECTED], 0x80); |
| + } |
| case kColorId_NumColors: |
| NOTREACHED(); |
| break; |
| } |
| - |
| return SkColorToGdkColor(kInvalidColorIdColor); |
|
dschuyler
2015/03/13 06:01:24
I removed the blank line by mistake. I'll add it
|
| } |