| OLD | NEW |
| 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_gtk2.h" | 5 #include "chrome/browser/ui/libgtkui/native_theme_gtk2.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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 return GetTextColor(GetMenuItem(), INSENSITIVE); | 267 return GetTextColor(GetMenuItem(), INSENSITIVE); |
| 268 } | 268 } |
| 269 case kColorId_MenuBackgroundColor: | 269 case kColorId_MenuBackgroundColor: |
| 270 return GetBGColor(GetMenu(), NORMAL); | 270 return GetBGColor(GetMenu(), NORMAL); |
| 271 | 271 |
| 272 // Label | 272 // Label |
| 273 case kColorId_LabelEnabledColor: | 273 case kColorId_LabelEnabledColor: |
| 274 return GetTextColor(GetEntry(), NORMAL); | 274 return GetTextColor(GetEntry(), NORMAL); |
| 275 case kColorId_LabelDisabledColor: | 275 case kColorId_LabelDisabledColor: |
| 276 return GetTextColor(GetLabel(), INSENSITIVE); | 276 return GetTextColor(GetLabel(), INSENSITIVE); |
| 277 case kColorId_LabelTextSelectionColor: |
| 278 return GetTextColor(GetLabel(), SELECTED); |
| 279 case kColorId_LabelTextSelectionBackgroundFocused: |
| 280 return GetBaseColor(GetLabel(), SELECTED); |
| 277 | 281 |
| 278 // Link | 282 // Link |
| 279 case kColorId_LinkDisabled: | 283 case kColorId_LinkDisabled: |
| 280 return SkColorSetA(GetSystemColor(kColorId_LinkEnabled), 0xBB); | 284 return SkColorSetA(GetSystemColor(kColorId_LinkEnabled), 0xBB); |
| 281 case kColorId_LinkEnabled: { | 285 case kColorId_LinkEnabled: { |
| 282 SkColor link_color = SK_ColorTRANSPARENT; | 286 SkColor link_color = SK_ColorTRANSPARENT; |
| 283 GetChromeStyleColor("link-color", &link_color); | 287 GetChromeStyleColor("link-color", &link_color); |
| 284 if (link_color != SK_ColorTRANSPARENT) | 288 if (link_color != SK_ColorTRANSPARENT) |
| 285 return link_color; | 289 return link_color; |
| 286 // Default color comes from gtklinkbutton.c. | 290 // Default color comes from gtklinkbutton.c. |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 | 569 |
| 566 if (!fake_menu_item) { | 570 if (!fake_menu_item) { |
| 567 fake_menu_item = gtk_custom_menu_item_new(); | 571 fake_menu_item = gtk_custom_menu_item_new(); |
| 568 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); | 572 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); |
| 569 } | 573 } |
| 570 | 574 |
| 571 return fake_menu_item; | 575 return fake_menu_item; |
| 572 } | 576 } |
| 573 | 577 |
| 574 } // namespace libgtkui | 578 } // namespace libgtkui |
| OLD | NEW |