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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 gdk_color_free(style_color); | 190 gdk_color_free(style_color); |
191 } | 191 } |
192 if (link_color != SK_ColorTRANSPARENT) | 192 if (link_color != SK_ColorTRANSPARENT) |
193 return link_color; | 193 return link_color; |
194 // Default color comes from gtklinkbutton.c. | 194 // Default color comes from gtklinkbutton.c. |
195 return SkColorSetRGB(0x00, 0x00, 0xEE); | 195 return SkColorSetRGB(0x00, 0x00, 0xEE); |
196 } | 196 } |
197 case kColorId_LinkPressed: | 197 case kColorId_LinkPressed: |
198 return SK_ColorRED; | 198 return SK_ColorRED; |
199 | 199 |
| 200 // Separator |
| 201 case kColorId_SeparatorColor: |
| 202 return GetFgColor(GetSeparator(), INSENSITIVE); |
| 203 |
200 // Button | 204 // Button |
201 case kColorId_ButtonEnabledColor: | 205 case kColorId_ButtonEnabledColor: |
202 return GetTextColor(GetButton(), NORMAL); | 206 return GetTextColor(GetButton(), NORMAL); |
203 case kColorId_BlueButtonEnabledColor: | 207 case kColorId_BlueButtonEnabledColor: |
204 return GetTextColor(GetBlueButton(), NORMAL); | 208 return GetTextColor(GetBlueButton(), NORMAL); |
205 case kColorId_ButtonDisabledColor: | 209 case kColorId_ButtonDisabledColor: |
206 return GetTextColor(GetButton(), INSENSITIVE); | 210 return GetTextColor(GetButton(), INSENSITIVE); |
207 case kColorId_BlueButtonDisabledColor: | 211 case kColorId_BlueButtonDisabledColor: |
208 return GetTextColor(GetBlueButton(), INSENSITIVE); | 212 return GetTextColor(GetBlueButton(), INSENSITIVE); |
209 case kColorId_ButtonHoverColor: | 213 case kColorId_ButtonHoverColor: |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 static GtkWidget* fake_menu_item = NULL; | 444 static GtkWidget* fake_menu_item = NULL; |
441 | 445 |
442 if (!fake_menu_item) { | 446 if (!fake_menu_item) { |
443 fake_menu_item = gtk_custom_menu_item_new(); | 447 fake_menu_item = gtk_custom_menu_item_new(); |
444 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); | 448 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); |
445 } | 449 } |
446 | 450 |
447 return fake_menu_item; | 451 return fake_menu_item; |
448 } | 452 } |
449 | 453 |
| 454 GtkWidget* NativeThemeGtk2::GetSeparator() const { |
| 455 static GtkWidget* fake_separator = NULL; |
| 456 |
| 457 if (!fake_separator) |
| 458 fake_separator = gtk_hseparator_new(); |
| 459 |
| 460 return fake_separator; |
| 461 } |
| 462 |
450 } // namespace libgtkui | 463 } // namespace libgtkui |
OLD | NEW |