Index: ui/views/controls/combobox/native_combobox_views.cc |
diff --git a/ui/views/controls/combobox/native_combobox_views.cc b/ui/views/controls/combobox/native_combobox_views.cc |
index d377b612eace61f36be520628537c61275563974..e070e43b3b6c65beea0a44eb494ddb4df31c594f 100644 |
--- a/ui/views/controls/combobox/native_combobox_views.cc |
+++ b/ui/views/controls/combobox/native_combobox_views.cc |
@@ -15,6 +15,7 @@ |
#include "ui/gfx/font.h" |
#include "ui/gfx/image/image.h" |
#include "ui/gfx/path.h" |
+#include "ui/native_theme/native_theme.h" |
#include "ui/views/background.h" |
#include "ui/views/border.h" |
#include "ui/views/controls/combobox/combobox.h" |
@@ -47,12 +48,6 @@ const int kMinComboboxWidth = 148; |
const int kDisclosureArrowLeftPadding = 7; |
const int kDisclosureArrowRightPadding = 7; |
-// Color settings for text and border. |
-// These are tentative, and should be derived from theme, system |
-// settings and current settings. |
-const SkColor kTextColor = SK_ColorBLACK; |
-const SkColor kInvalidTextColor = SK_ColorWHITE; |
- |
// Define the id of the first item in the menu (since it needs to be > 0) |
const int kFirstMenuItemId = 1000; |
@@ -328,7 +323,9 @@ void NativeComboboxViews::PaintText(gfx::Canvas* canvas) { |
int x = insets.left(); |
int y = insets.top(); |
int text_height = height() - insets.height(); |
- SkColor text_color = combobox_->invalid() ? kInvalidTextColor : kTextColor; |
+ SkColor text_color = GetNativeTheme()->GetSystemColor( |
+ combobox_->invalid() ? ui::NativeTheme::kColorId_LabelDisabledColor : |
Evan Stade
2013/05/01 23:18:50
this broke the code. For my desktop chromeos build
Elliot Glaysher
2013/05/01 23:23:20
Desktop chromeos shouldn't be using NativeThemeGtk
Evan Stade
2013/05/01 23:28:45
no. LabelDisabledColor is just not the right color
|
+ ui::NativeTheme::kColorId_LabelEnabledColor); |
int index = GetSelectedIndex(); |
if (index < 0 || index > combobox_->model()->GetItemCount()) |