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

Side by Side Diff: chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc

Issue 263533003: Revert of Linux Aura: get tooltip background color from theme (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | ui/native_theme/fallback_theme.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/libgtk2ui/native_theme_gtk2.h" 5 #include "chrome/browser/ui/libgtk2ui/native_theme_gtk2.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h" 9 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h"
10 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" 10 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 return GetEntryStyle()->base[GTK_STATE_NORMAL]; 238 return GetEntryStyle()->base[GTK_STATE_NORMAL];
239 case kColorId_TextfieldReadOnlyColor: 239 case kColorId_TextfieldReadOnlyColor:
240 return GetEntryStyle()->text[GTK_STATE_INSENSITIVE]; 240 return GetEntryStyle()->text[GTK_STATE_INSENSITIVE];
241 case kColorId_TextfieldReadOnlyBackground: 241 case kColorId_TextfieldReadOnlyBackground:
242 return GetEntryStyle()->base[GTK_STATE_INSENSITIVE]; 242 return GetEntryStyle()->base[GTK_STATE_INSENSITIVE];
243 case kColorId_TextfieldSelectionColor: 243 case kColorId_TextfieldSelectionColor:
244 return GetEntryStyle()->text[GTK_STATE_SELECTED]; 244 return GetEntryStyle()->text[GTK_STATE_SELECTED];
245 case kColorId_TextfieldSelectionBackgroundFocused: 245 case kColorId_TextfieldSelectionBackgroundFocused:
246 return GetEntryStyle()->base[GTK_STATE_SELECTED]; 246 return GetEntryStyle()->base[GTK_STATE_SELECTED];
247 247
248 // Tooltips 248 // Trees and Tables (implemented on GTK using the same class)
249 case kColorId_TooltipBackground:
250 return GetWindowStyle()->bg[GTK_STATE_NORMAL];
251
252 // Trees and Tables (implemented on GTK using the same class)
253 case kColorId_TableBackground: 249 case kColorId_TableBackground:
254 case kColorId_TreeBackground: 250 case kColorId_TreeBackground:
255 return GetTreeStyle()->bg[GTK_STATE_NORMAL]; 251 return GetTreeStyle()->bg[GTK_STATE_NORMAL];
256 case kColorId_TableText: 252 case kColorId_TableText:
257 case kColorId_TreeText: 253 case kColorId_TreeText:
258 return GetTreeStyle()->text[GTK_STATE_NORMAL]; 254 return GetTreeStyle()->text[GTK_STATE_NORMAL];
259 case kColorId_TableSelectedText: 255 case kColorId_TableSelectedText:
260 case kColorId_TableSelectedTextUnfocused: 256 case kColorId_TableSelectedTextUnfocused:
261 case kColorId_TreeSelectedText: 257 case kColorId_TreeSelectedText:
262 case kColorId_TreeSelectedTextUnfocused: 258 case kColorId_TreeSelectedTextUnfocused:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 case kColorId_ResultsTableHoveredDivider: { 313 case kColorId_ResultsTableHoveredDivider: {
318 GtkStyle* win_style = GetWindowStyle(); 314 GtkStyle* win_style = GetWindowStyle();
319 return GdkAlphaBlend(win_style->text[GTK_STATE_PRELIGHT], 315 return GdkAlphaBlend(win_style->text[GTK_STATE_PRELIGHT],
320 win_style->bg[GTK_STATE_PRELIGHT], 0x34); 316 win_style->bg[GTK_STATE_PRELIGHT], 0x34);
321 } 317 }
322 case kColorId_ResultsTableSelectedDivider: { 318 case kColorId_ResultsTableSelectedDivider: {
323 GtkStyle* win_style = GetWindowStyle(); 319 GtkStyle* win_style = GetWindowStyle();
324 return GdkAlphaBlend(win_style->text[GTK_STATE_SELECTED], 320 return GdkAlphaBlend(win_style->text[GTK_STATE_SELECTED],
325 win_style->bg[GTK_STATE_SELECTED], 0x34); 321 win_style->bg[GTK_STATE_SELECTED], 0x34);
326 } 322 }
323 default:
324 // Fall through
325 break;
327 } 326 }
328 327
329 return SkColorToGdkColor(kInvalidColorIdColor); 328 return SkColorToGdkColor(kInvalidColorIdColor);
330 } 329 }
331 330
332 GtkWidget* NativeThemeGtk2::GetRealizedWindow() const { 331 GtkWidget* NativeThemeGtk2::GetRealizedWindow() const {
333 if (!fake_window_) { 332 if (!fake_window_) {
334 fake_window_ = gtk_window_new(GTK_WINDOW_TOPLEVEL); 333 fake_window_ = gtk_window_new(GTK_WINDOW_TOPLEVEL);
335 gtk_widget_realize(fake_window_); 334 gtk_widget_realize(fake_window_);
336 } 335 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 fake_menu_.Own(gtk_custom_menu_new()); 386 fake_menu_.Own(gtk_custom_menu_new());
388 387
389 fake_menu_item_ = gtk_custom_menu_item_new(); 388 fake_menu_item_ = gtk_custom_menu_item_new();
390 gtk_menu_shell_append(GTK_MENU_SHELL(fake_menu_.get()), fake_menu_item_); 389 gtk_menu_shell_append(GTK_MENU_SHELL(fake_menu_.get()), fake_menu_item_);
391 } 390 }
392 391
393 return gtk_rc_get_style(fake_menu_item_); 392 return gtk_rc_get_style(fake_menu_item_);
394 } 393 }
395 394
396 } // namespace libgtk2ui 395 } // namespace libgtk2ui
OLDNEW
« no previous file with comments | « no previous file | ui/native_theme/fallback_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698