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

Side by Side Diff: chrome/browser/ui/gtk/gtk_theme_service.cc

Issue 10535126: Eliminate the "clock" icon in the omnibox dropdown. The distinction between this and the globe was… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
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 "chrome/browser/ui/gtk/gtk_theme_service.h" 5 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 IDR_THEME_FRAME_INCOGNITO_INACTIVE, 98 IDR_THEME_FRAME_INCOGNITO_INACTIVE,
99 }; 99 };
100 100
101 // A list of icons used in the autocomplete view that should be tinted to the 101 // A list of icons used in the autocomplete view that should be tinted to the
102 // current gtk theme selection color so they stand out against the GtkEntry's 102 // current gtk theme selection color so they stand out against the GtkEntry's
103 // base color. 103 // base color.
104 const int kAutocompleteImages[] = { 104 const int kAutocompleteImages[] = {
105 IDR_OMNIBOX_EXTENSION_APP, 105 IDR_OMNIBOX_EXTENSION_APP,
106 IDR_OMNIBOX_HTTP, 106 IDR_OMNIBOX_HTTP,
107 IDR_OMNIBOX_HTTP_DARK, 107 IDR_OMNIBOX_HTTP_DARK,
108 IDR_OMNIBOX_HISTORY,
109 IDR_OMNIBOX_HISTORY_DARK,
110 IDR_OMNIBOX_SEARCH, 108 IDR_OMNIBOX_SEARCH,
111 IDR_OMNIBOX_SEARCH_DARK, 109 IDR_OMNIBOX_SEARCH_DARK,
112 IDR_OMNIBOX_STAR, 110 IDR_OMNIBOX_STAR,
113 IDR_OMNIBOX_STAR_DARK, 111 IDR_OMNIBOX_STAR_DARK,
114 IDR_OMNIBOX_TTS, 112 IDR_OMNIBOX_TTS,
115 IDR_OMNIBOX_TTS_DARK, 113 IDR_OMNIBOX_TTS_DARK,
116 IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON, 114 IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON,
117 IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON, 115 IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON,
118 }; 116 };
119 117
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 case IDR_THEME_FRAME_INCOGNITO_INACTIVE: { 966 case IDR_THEME_FRAME_INCOGNITO_INACTIVE: {
969 return GenerateFrameImage( 967 return GenerateFrameImage(
970 ThemeService::COLOR_FRAME_INCOGNITO_INACTIVE, 968 ThemeService::COLOR_FRAME_INCOGNITO_INACTIVE,
971 "incognito-inactive-frame-gradient-color"); 969 "incognito-inactive-frame-gradient-color");
972 } 970 }
973 // Icons that sit inside the omnibox shouldn't receive TINT_BUTTONS and 971 // Icons that sit inside the omnibox shouldn't receive TINT_BUTTONS and
974 // instead should tint based on the foreground text entry color in GTK+ 972 // instead should tint based on the foreground text entry color in GTK+
975 // mode because some themes that try to be dark *and* light have very 973 // mode because some themes that try to be dark *and* light have very
976 // different colors between the omnibox and the normal background area. 974 // different colors between the omnibox and the normal background area.
977 case IDR_OMNIBOX_EXTENSION_APP: 975 case IDR_OMNIBOX_EXTENSION_APP:
978 case IDR_OMNIBOX_HISTORY:
979 case IDR_OMNIBOX_HTTP: 976 case IDR_OMNIBOX_HTTP:
980 case IDR_OMNIBOX_SEARCH: 977 case IDR_OMNIBOX_SEARCH:
981 case IDR_OMNIBOX_STAR: 978 case IDR_OMNIBOX_STAR:
982 case IDR_OMNIBOX_TTS: 979 case IDR_OMNIBOX_TTS:
983 case IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON: 980 case IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON:
984 case IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON: { 981 case IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON: {
985 return GenerateTintedIcon(id, entry_tint_); 982 return GenerateTintedIcon(id, entry_tint_);
986 } 983 }
987 // In GTK mode, the dark versions of the omnibox icons only ever appear in 984 // In GTK mode, the dark versions of the omnibox icons only ever appear in
988 // the autocomplete popup and only against the current theme's GtkEntry 985 // the autocomplete popup and only against the current theme's GtkEntry
989 // base[GTK_STATE_SELECTED] color, so tint the icons so they won't collide 986 // base[GTK_STATE_SELECTED] color, so tint the icons so they won't collide
990 // with the selected color. 987 // with the selected color.
991 case IDR_OMNIBOX_EXTENSION_APP_DARK: 988 case IDR_OMNIBOX_EXTENSION_APP_DARK:
992 case IDR_OMNIBOX_HISTORY_DARK:
993 case IDR_OMNIBOX_HTTP_DARK: 989 case IDR_OMNIBOX_HTTP_DARK:
994 case IDR_OMNIBOX_SEARCH_DARK: 990 case IDR_OMNIBOX_SEARCH_DARK:
995 case IDR_OMNIBOX_STAR_DARK: 991 case IDR_OMNIBOX_STAR_DARK:
996 case IDR_OMNIBOX_TTS_DARK: { 992 case IDR_OMNIBOX_TTS_DARK: {
997 return GenerateTintedIcon(id, selected_entry_tint_); 993 return GenerateTintedIcon(id, selected_entry_tint_);
998 } 994 }
999 default: { 995 default: {
1000 return GenerateTintedIcon(id, button_tint_); 996 return GenerateTintedIcon(id, button_tint_);
1001 } 997 }
1002 } 998 }
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 cairo_new_path(cr); 1146 cairo_new_path(cr);
1151 cairo_set_line_width(cr, 1.0); 1147 cairo_set_line_width(cr, 1.0);
1152 cairo_move_to(cr, start_x, allocation.y); 1148 cairo_move_to(cr, start_x, allocation.y);
1153 cairo_line_to(cr, start_x, allocation.y + allocation.height); 1149 cairo_line_to(cr, start_x, allocation.y + allocation.height);
1154 cairo_stroke(cr); 1150 cairo_stroke(cr);
1155 cairo_destroy(cr); 1151 cairo_destroy(cr);
1156 cairo_pattern_destroy(pattern); 1152 cairo_pattern_destroy(pattern);
1157 1153
1158 return TRUE; 1154 return TRUE;
1159 } 1155 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm ('k') | chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698