| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 case kColorId_TextfieldDefaultColor: | 317 case kColorId_TextfieldDefaultColor: |
| 318 return GetTextColor(GetEntry(), NORMAL); | 318 return GetTextColor(GetEntry(), NORMAL); |
| 319 case kColorId_TextfieldDefaultBackground: | 319 case kColorId_TextfieldDefaultBackground: |
| 320 return GetBaseColor(GetEntry(), NORMAL); | 320 return GetBaseColor(GetEntry(), NORMAL); |
| 321 | 321 |
| 322 #if GTK_MAJOR_VERSION == 2 | 322 #if GTK_MAJOR_VERSION == 2 |
| 323 case kColorId_TextfieldReadOnlyColor: | 323 case kColorId_TextfieldReadOnlyColor: |
| 324 return GetTextColor(GetEntry(), ACTIVE); | 324 return GetTextColor(GetEntry(), ACTIVE); |
| 325 case kColorId_TextfieldReadOnlyBackground: | 325 case kColorId_TextfieldReadOnlyBackground: |
| 326 return GetBaseColor(GetEntry(), ACTIVE); | 326 return GetBaseColor(GetEntry(), ACTIVE); |
| 327 case kColorId_TextfieldSelectionColor: | |
| 328 return GetTextColor(GetEntry(), SELECTED); | |
| 329 case kColorId_TextfieldSelectionBackgroundFocused: | |
| 330 return GetBaseColor(GetEntry(), SELECTED); | |
| 331 #else | 327 #else |
| 332 case kColorId_TextfieldReadOnlyColor: | 328 case kColorId_TextfieldReadOnlyColor: |
| 333 return GetTextColor(GetEntry(), SELECTED); | 329 return GetTextColor(GetEntry(), SELECTED); |
| 334 case kColorId_TextfieldReadOnlyBackground: | 330 case kColorId_TextfieldReadOnlyBackground: |
| 335 return GetBaseColor(GetEntry(), SELECTED); | 331 return GetBaseColor(GetEntry(), SELECTED); |
| 332 #endif |
| 336 case kColorId_TextfieldSelectionColor: | 333 case kColorId_TextfieldSelectionColor: |
| 337 return GetTextColor(GetLabel(), SELECTED); | 334 return GetTextColor(GetLabel(), SELECTED); |
| 338 case kColorId_TextfieldSelectionBackgroundFocused: | 335 case kColorId_TextfieldSelectionBackgroundFocused: |
| 339 return GetBaseColor(GetLabel(), SELECTED); | 336 return GetBaseColor(GetLabel(), SELECTED); |
| 340 #endif | 337 case kColorId_TextfieldSelectionBackgroundUnfocused: |
| 341 | 338 return GetBaseColor(GetLabel(), INSENSITIVE); |
| 342 | 339 |
| 343 // Tooltips | 340 // Tooltips |
| 344 case kColorId_TooltipBackground: | 341 case kColorId_TooltipBackground: |
| 345 return GetBGColor(GetTooltip(), NORMAL); | 342 return GetBGColor(GetTooltip(), NORMAL); |
| 346 case kColorId_TooltipText: | 343 case kColorId_TooltipText: |
| 347 return GetFGColor(GetTooltip(), NORMAL); | 344 return GetFGColor(GetTooltip(), NORMAL); |
| 348 | 345 |
| 349 // Trees and Tables (implemented on GTK using the same class) | 346 // Trees and Tables (implemented on GTK using the same class) |
| 350 case kColorId_TableBackground: | 347 case kColorId_TableBackground: |
| 351 case kColorId_TreeBackground: | 348 case kColorId_TreeBackground: |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 | 562 |
| 566 if (!fake_menu_item) { | 563 if (!fake_menu_item) { |
| 567 fake_menu_item = gtk_custom_menu_item_new(); | 564 fake_menu_item = gtk_custom_menu_item_new(); |
| 568 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); | 565 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); |
| 569 } | 566 } |
| 570 | 567 |
| 571 return fake_menu_item; | 568 return fake_menu_item; |
| 572 } | 569 } |
| 573 | 570 |
| 574 } // namespace libgtk2ui | 571 } // namespace libgtk2ui |
| OLD | NEW |