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

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

Issue 2413223003: Views:: Make Labels support text selection. (Closed)
Patch Set: Rebase 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') | 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/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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 return GetTextColor(GetMenuItem(), INSENSITIVE); 265 return GetTextColor(GetMenuItem(), INSENSITIVE);
266 } 266 }
267 case kColorId_MenuBackgroundColor: 267 case kColorId_MenuBackgroundColor:
268 return GetBGColor(GetMenu(), NORMAL); 268 return GetBGColor(GetMenu(), NORMAL);
269 269
270 // Label 270 // Label
271 case kColorId_LabelEnabledColor: 271 case kColorId_LabelEnabledColor:
272 return GetTextColor(GetEntry(), NORMAL); 272 return GetTextColor(GetEntry(), NORMAL);
273 case kColorId_LabelDisabledColor: 273 case kColorId_LabelDisabledColor:
274 return GetTextColor(GetLabel(), INSENSITIVE); 274 return GetTextColor(GetLabel(), INSENSITIVE);
275 case kColorId_LabelTextSelectionColor:
276 return GetTextColor(GetLabel(), SELECTED);
277 case kColorId_LabelTextSelectionBackgroundFocused:
278 return GetBaseColor(GetLabel(), SELECTED);
275 279
276 // Link 280 // Link
277 case kColorId_LinkDisabled: 281 case kColorId_LinkDisabled:
278 return SkColorSetA(GetSystemColor(kColorId_LinkEnabled), 0xBB); 282 return SkColorSetA(GetSystemColor(kColorId_LinkEnabled), 0xBB);
279 case kColorId_LinkEnabled: { 283 case kColorId_LinkEnabled: {
280 SkColor link_color = SK_ColorTRANSPARENT; 284 SkColor link_color = SK_ColorTRANSPARENT;
281 GetChromeStyleColor("link-color", &link_color); 285 GetChromeStyleColor("link-color", &link_color);
282 if (link_color != SK_ColorTRANSPARENT) 286 if (link_color != SK_ColorTRANSPARENT)
283 return link_color; 287 return link_color;
284 // Default color comes from gtklinkbutton.c. 288 // Default color comes from gtklinkbutton.c.
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 562
559 if (!fake_menu_item) { 563 if (!fake_menu_item) {
560 fake_menu_item = gtk_custom_menu_item_new(); 564 fake_menu_item = gtk_custom_menu_item_new();
561 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); 565 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item);
562 } 566 }
563 567
564 return fake_menu_item; 568 return fake_menu_item;
565 } 569 }
566 570
567 } // namespace libgtkui 571 } // namespace libgtkui
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/render_text.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698