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/libgtk2ui/native_theme_gtk2.h" | 5 #include "chrome/browser/ui/libgtk2ui/native_theme_gtk2.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h" | 9 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h" |
10 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" | 10 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 case kColorId_ButtonEnabledColor: | 229 case kColorId_ButtonEnabledColor: |
230 return GetButtonStyle()->text[GTK_STATE_NORMAL]; | 230 return GetButtonStyle()->text[GTK_STATE_NORMAL]; |
231 case kColorId_ButtonDisabledColor: | 231 case kColorId_ButtonDisabledColor: |
232 return GetButtonStyle()->text[GTK_STATE_INSENSITIVE]; | 232 return GetButtonStyle()->text[GTK_STATE_INSENSITIVE]; |
233 case kColorId_ButtonHighlightColor: | 233 case kColorId_ButtonHighlightColor: |
234 return GetButtonStyle()->base[GTK_STATE_SELECTED]; | 234 return GetButtonStyle()->base[GTK_STATE_SELECTED]; |
235 case kColorId_ButtonHoverColor: | 235 case kColorId_ButtonHoverColor: |
236 return GetButtonStyle()->text[GTK_STATE_PRELIGHT]; | 236 return GetButtonStyle()->text[GTK_STATE_PRELIGHT]; |
237 case kColorId_ButtonHoverBackgroundColor: | 237 case kColorId_ButtonHoverBackgroundColor: |
238 return GetButtonStyle()->bg[GTK_STATE_PRELIGHT]; | 238 return GetButtonStyle()->bg[GTK_STATE_PRELIGHT]; |
239 // TODO(estade): determine a more distinct color for the CallToAction | |
msw
2014/06/02 21:06:20
How about using the existing button colors above (
Evan Stade
2014/06/02 22:18:14
I don't follow. This code just makes blue buttons
msw
2014/06/02 22:39:44
Yeah, I suggest (1) using readable versions of the
| |
240 // buttons. | |
241 case kColorId_CallToActionButtonEnabledColor: | |
msw
2014/06/03 22:20:41
Rename these kColorId_BlueButton*, or rename BlueB
Evan Stade
2014/06/03 23:16:12
Done.
This reminds me of the part of Earthworm Ji
msw
2014/06/03 23:24:52
FYI, you haven't uploaded the latest patch set wit
Evan Stade
2014/06/04 00:12:10
Done.
| |
242 return GetButtonStyle()->text[GTK_STATE_NORMAL]; | |
243 case kColorId_CallToActionButtonDisabledColor: | |
244 return GetButtonStyle()->text[GTK_STATE_INSENSITIVE]; | |
245 case kColorId_CallToActionButtonHighlightColor: | |
246 return GetButtonStyle()->base[GTK_STATE_SELECTED]; | |
247 case kColorId_CallToActionButtonHoverColor: | |
248 return GetButtonStyle()->text[GTK_STATE_PRELIGHT]; | |
239 | 249 |
240 // Textfield | 250 // Textfield |
241 case kColorId_TextfieldDefaultColor: | 251 case kColorId_TextfieldDefaultColor: |
242 return GetEntryStyle()->text[GTK_STATE_NORMAL]; | 252 return GetEntryStyle()->text[GTK_STATE_NORMAL]; |
243 case kColorId_TextfieldDefaultBackground: | 253 case kColorId_TextfieldDefaultBackground: |
244 return GetEntryStyle()->base[GTK_STATE_NORMAL]; | 254 return GetEntryStyle()->base[GTK_STATE_NORMAL]; |
245 case kColorId_TextfieldReadOnlyColor: | 255 case kColorId_TextfieldReadOnlyColor: |
246 return GetEntryStyle()->text[GTK_STATE_INSENSITIVE]; | 256 return GetEntryStyle()->text[GTK_STATE_INSENSITIVE]; |
247 case kColorId_TextfieldReadOnlyBackground: | 257 case kColorId_TextfieldReadOnlyBackground: |
248 return GetEntryStyle()->base[GTK_STATE_INSENSITIVE]; | 258 return GetEntryStyle()->base[GTK_STATE_INSENSITIVE]; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
404 fake_menu_.Own(gtk_custom_menu_new()); | 414 fake_menu_.Own(gtk_custom_menu_new()); |
405 | 415 |
406 fake_menu_item_ = gtk_custom_menu_item_new(); | 416 fake_menu_item_ = gtk_custom_menu_item_new(); |
407 gtk_menu_shell_append(GTK_MENU_SHELL(fake_menu_.get()), fake_menu_item_); | 417 gtk_menu_shell_append(GTK_MENU_SHELL(fake_menu_.get()), fake_menu_item_); |
408 } | 418 } |
409 | 419 |
410 return gtk_rc_get_style(fake_menu_item_); | 420 return gtk_rc_get_style(fake_menu_item_); |
411 } | 421 } |
412 | 422 |
413 } // namespace libgtk2ui | 423 } // namespace libgtk2ui |
OLD | NEW |