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