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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 static GtkWidget* fake_menu_item = NULL; | 452 static GtkWidget* fake_menu_item = NULL; |
449 | 453 |
450 if (!fake_menu_item) { | 454 if (!fake_menu_item) { |
451 fake_menu_item = gtk_custom_menu_item_new(); | 455 fake_menu_item = gtk_custom_menu_item_new(); |
452 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); | 456 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); |
453 } | 457 } |
454 | 458 |
455 return fake_menu_item; | 459 return fake_menu_item; |
456 } | 460 } |
457 | 461 |
| 462 GtkWidget* NativeThemeGtk2::GetSeparator() const { |
| 463 static GtkWidget* fake_separator = NULL; |
| 464 |
| 465 if (!fake_separator) |
| 466 fake_separator = gtk_hseparator_new(); |
| 467 |
| 468 return fake_separator; |
| 469 } |
| 470 |
458 } // namespace libgtkui | 471 } // namespace libgtkui |
OLD | NEW |