Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: ui/native_theme/native_theme_mac.mm

Issue 231883003: [stash] 20140404-crbug-312961-mac-views-bridge-C-wholegrid Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_surface_mac.cc ('k') | ui/views/controls/menu/menu_item_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/native_theme_mac.mm
diff --git a/ui/native_theme/native_theme_mac.mm b/ui/native_theme/native_theme_mac.mm
index c3152a8d14582fcd4275d808283e813769e68e6c..ffdd864caaf038dcadb07ba2ceddb940df1c49dd 100644
--- a/ui/native_theme/native_theme_mac.mm
+++ b/ui/native_theme/native_theme_mac.mm
@@ -4,14 +4,23 @@
#include "ui/native_theme/native_theme_mac.h"
+#include <Cocoa/Cocoa.h>
+
#include "base/basictypes.h"
#include "ui/native_theme/common_theme.h"
+#include "skia/ext/skia_utils_mac.h"
namespace {
const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128);
const SkColor kDialogBackgroundColor = SkColorSetRGB(251, 251, 251);
+// System colors use NSNamedColorSpace System.
+SkColor SystemColor(NSColor* color) {
+ return gfx::NSDeviceColorToSkColor(
+ [color colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]]);
+}
+
} // namespace
namespace ui {
@@ -35,6 +44,12 @@ SkColor NativeThemeMac::GetSystemColor(ColorId color_id) const {
switch (color_id) {
case kColorId_DialogBackground:
return kDialogBackgroundColor;
+ case kColorId_LabelEnabledColor:
+ return SystemColor([NSColor controlTextColor]);
+ case kColorId_LabelDisabledColor:
+ return SystemColor([NSColor disabledControlTextColor]);
+ case kColorId_LabelBackgroundColor:
+ return SystemColor([NSColor textBackgroundColor]);
default:
NOTREACHED() << "Invalid color_id: " << color_id;
}
« no previous file with comments | « ui/gl/gl_surface_mac.cc ('k') | ui/views/controls/menu/menu_item_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698