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