| 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_frame.h" | 9 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_frame.h" |
| 10 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h" | 10 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h" |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 case kColorId_TextfieldDefaultColor: | 324 case kColorId_TextfieldDefaultColor: |
| 325 return GetTextColor(GetEntry(), NORMAL); | 325 return GetTextColor(GetEntry(), NORMAL); |
| 326 case kColorId_TextfieldDefaultBackground: | 326 case kColorId_TextfieldDefaultBackground: |
| 327 return GetBaseColor(GetEntry(), NORMAL); | 327 return GetBaseColor(GetEntry(), NORMAL); |
| 328 | 328 |
| 329 #if GTK_MAJOR_VERSION == 2 | 329 #if GTK_MAJOR_VERSION == 2 |
| 330 case kColorId_TextfieldReadOnlyColor: | 330 case kColorId_TextfieldReadOnlyColor: |
| 331 return GetTextColor(GetEntry(), ACTIVE); | 331 return GetTextColor(GetEntry(), ACTIVE); |
| 332 case kColorId_TextfieldReadOnlyBackground: | 332 case kColorId_TextfieldReadOnlyBackground: |
| 333 return GetBaseColor(GetEntry(), ACTIVE); | 333 return GetBaseColor(GetEntry(), ACTIVE); |
| 334 case kColorId_TextfieldSelectionColor: | |
| 335 return GetTextColor(GetEntry(), SELECTED); | |
| 336 case kColorId_TextfieldSelectionBackgroundFocused: | |
| 337 return GetBaseColor(GetEntry(), SELECTED); | |
| 338 #else | 334 #else |
| 339 case kColorId_TextfieldReadOnlyColor: | 335 case kColorId_TextfieldReadOnlyColor: |
| 340 return GetTextColor(GetEntry(), SELECTED); | 336 return GetTextColor(GetEntry(), SELECTED); |
| 341 case kColorId_TextfieldReadOnlyBackground: | 337 case kColorId_TextfieldReadOnlyBackground: |
| 342 return GetBaseColor(GetEntry(), SELECTED); | 338 return GetBaseColor(GetEntry(), SELECTED); |
| 339 #endif |
| 343 case kColorId_TextfieldSelectionColor: | 340 case kColorId_TextfieldSelectionColor: |
| 344 return GetTextColor(GetLabel(), SELECTED); | 341 return GetTextColor(GetLabel(), SELECTED); |
| 345 case kColorId_TextfieldSelectionBackgroundFocused: | 342 case kColorId_TextfieldSelectionBackgroundFocused: |
| 346 return GetBaseColor(GetLabel(), SELECTED); | 343 return GetBaseColor(GetLabel(), SELECTED); |
| 347 #endif | 344 case kColorId_TextfieldSelectionBackgroundUnfocused: |
| 348 | 345 return GetBaseColor(GetLabel(), SELECTED); |
| 349 | 346 |
| 350 // Tooltips | 347 // Tooltips |
| 351 case kColorId_TooltipBackground: | 348 case kColorId_TooltipBackground: |
| 352 return GetBGColor(GetTooltip(), NORMAL); | 349 return GetBGColor(GetTooltip(), NORMAL); |
| 353 case kColorId_TooltipText: | 350 case kColorId_TooltipText: |
| 354 return GetFGColor(GetTooltip(), NORMAL); | 351 return GetFGColor(GetTooltip(), NORMAL); |
| 355 | 352 |
| 356 // Trees and Tables (implemented on GTK using the same class) | 353 // Trees and Tables (implemented on GTK using the same class) |
| 357 case kColorId_TableBackground: | 354 case kColorId_TableBackground: |
| 358 case kColorId_TreeBackground: | 355 case kColorId_TreeBackground: |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 | 569 |
| 573 if (!fake_menu_item) { | 570 if (!fake_menu_item) { |
| 574 fake_menu_item = gtk_custom_menu_item_new(); | 571 fake_menu_item = gtk_custom_menu_item_new(); |
| 575 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); | 572 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); |
| 576 } | 573 } |
| 577 | 574 |
| 578 return fake_menu_item; | 575 return fake_menu_item; |
| 579 } | 576 } |
| 580 | 577 |
| 581 } // namespace libgtk2ui | 578 } // namespace libgtk2ui |
| OLD | NEW |