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

Unified Diff: chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc

Issue 795933009: [AiS] for desktop, two lines and font sytles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Increase vertical spacing in suggestions 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 side-by-side diff with in-line comments
Download patch
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..19535b78313e8e2b29720310412f964e94f1de52 100644
--- a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc
+++ b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc
@@ -373,6 +373,80 @@ 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;

Powered by Google App Engine
This is Rietveld 408576698