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

Side by Side Diff: chrome/browser/ui/libgtkui/native_theme_gtk.cc

Issue 2345183002: Views: Draw Textfield selected text in gray when top-level Widget loses focus.
Patch Set: Fix lifetime issues with BorderView's widget_ and address review comments. Created 4 years, 1 month 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
« no previous file with comments | « no previous file | ui/gfx/render_text.h » ('j') | ui/gfx/render_text.h » ('J')
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/libgtkui/native_theme_gtk.h" 5 #include "chrome/browser/ui/libgtkui/native_theme_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "chrome/browser/ui/libgtkui/chrome_gtk_frame.h" 9 #include "chrome/browser/ui/libgtkui/chrome_gtk_frame.h"
10 #include "chrome/browser/ui/libgtkui/chrome_gtk_menu_subclasses.h" 10 #include "chrome/browser/ui/libgtkui/chrome_gtk_menu_subclasses.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 case kColorId_TextfieldDefaultColor: 315 case kColorId_TextfieldDefaultColor:
316 return GetTextColor(GetEntry(), NORMAL); 316 return GetTextColor(GetEntry(), NORMAL);
317 case kColorId_TextfieldDefaultBackground: 317 case kColorId_TextfieldDefaultBackground:
318 return GetBaseColor(GetEntry(), NORMAL); 318 return GetBaseColor(GetEntry(), NORMAL);
319 319
320 #if GTK_MAJOR_VERSION == 2 320 #if GTK_MAJOR_VERSION == 2
321 case kColorId_TextfieldReadOnlyColor: 321 case kColorId_TextfieldReadOnlyColor:
322 return GetTextColor(GetEntry(), ACTIVE); 322 return GetTextColor(GetEntry(), ACTIVE);
323 case kColorId_TextfieldReadOnlyBackground: 323 case kColorId_TextfieldReadOnlyBackground:
324 return GetBaseColor(GetEntry(), ACTIVE); 324 return GetBaseColor(GetEntry(), ACTIVE);
325 case kColorId_TextfieldSelectionColor:
326 return GetTextColor(GetEntry(), SELECTED);
327 case kColorId_TextfieldSelectionBackgroundFocused:
328 return GetBaseColor(GetEntry(), SELECTED);
329 #else 325 #else
330 case kColorId_TextfieldReadOnlyColor: 326 case kColorId_TextfieldReadOnlyColor:
331 return GetTextColor(GetEntry(), SELECTED); 327 return GetTextColor(GetEntry(), SELECTED);
332 case kColorId_TextfieldReadOnlyBackground: 328 case kColorId_TextfieldReadOnlyBackground:
333 return GetBaseColor(GetEntry(), SELECTED); 329 return GetBaseColor(GetEntry(), SELECTED);
330 #endif
334 case kColorId_TextfieldSelectionColor: 331 case kColorId_TextfieldSelectionColor:
335 return GetTextColor(GetLabel(), SELECTED); 332 return GetTextColor(GetLabel(), SELECTED);
336 case kColorId_TextfieldSelectionBackgroundFocused: 333 case kColorId_TextfieldSelectionBackgroundFocused:
337 return GetBaseColor(GetLabel(), SELECTED); 334 return GetBaseColor(GetLabel(), SELECTED);
338 #endif 335 case kColorId_TextfieldSelectionBackgroundUnfocused:
336 return GetBaseColor(GetLabel(), INSENSITIVE);
339 337
340 // Tooltips 338 // Tooltips
341 case kColorId_TooltipBackground: 339 case kColorId_TooltipBackground:
342 return GetBGColor(GetTooltip(), NORMAL); 340 return GetBGColor(GetTooltip(), NORMAL);
343 case kColorId_TooltipText: 341 case kColorId_TooltipText:
344 return GetFGColor(GetTooltip(), NORMAL); 342 return GetFGColor(GetTooltip(), NORMAL);
345 343
346 // Trees and Tables (implemented on GTK using the same class) 344 // Trees and Tables (implemented on GTK using the same class)
347 case kColorId_TableBackground: 345 case kColorId_TableBackground:
348 case kColorId_TreeBackground: 346 case kColorId_TreeBackground:
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 556
559 if (!fake_menu_item) { 557 if (!fake_menu_item) {
560 fake_menu_item = gtk_custom_menu_item_new(); 558 fake_menu_item = gtk_custom_menu_item_new();
561 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); 559 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item);
562 } 560 }
563 561
564 return fake_menu_item; 562 return fake_menu_item;
565 } 563 }
566 564
567 } // namespace libgtkui 565 } // namespace libgtkui
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/render_text.h » ('j') | ui/gfx/render_text.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698