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

Unified Diff: ui/message_center/cocoa/settings_controller.mm

Issue 240703004: Fix the remaining subpixel antialiasing bugs in the notification center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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
Index: ui/message_center/cocoa/settings_controller.mm
diff --git a/ui/message_center/cocoa/settings_controller.mm b/ui/message_center/cocoa/settings_controller.mm
index 1f8e2045171916b1d3c0b48da0ff2894efef5c51..3279aabff3f48f289b50fca7e0d081b8f89ca7f6 100644
--- a/ui/message_center/cocoa/settings_controller.mm
+++ b/ui/message_center/cocoa/settings_controller.mm
@@ -13,6 +13,7 @@
#include "grit/ui_strings.h"
#include "skia/ext/skia_utils_mac.h"
#include "ui/base/l10n/l10n_util.h"
+#import "ui/message_center/cocoa/opaque_views.h"
#import "ui/message_center/cocoa/settings_entry_view.h"
#import "ui/message_center/cocoa/tray_view_controller.h"
#include "ui/message_center/message_center_style.h"
@@ -104,12 +105,10 @@ void NotifierSettingsObserverMac::NotifierGroupChanged() {
}
- (NSTextField*)newLabelWithFrame:(NSRect)frame {
- NSTextField* label = [[NSTextField alloc] initWithFrame:frame];
- [label setDrawsBackground:NO];
- [label setBezeled:NO];
- [label setEditable:NO];
- [label setSelectable:NO];
- [label setAutoresizingMask:NSViewMinYMargin];
+ NSColor* color = gfx::SkColorToCalibratedNSColor(
+ message_center::kMessageCenterBackgroundColor);
+ MCTextField* label = [[MCTextField alloc] initWithFrame:frame andColor:color];
+
return label;
}
@@ -141,7 +140,6 @@ void NotifierSettingsObserverMac::NotifierGroupChanged() {
NSWidth(fullFrame),
NSHeight(fullFrame));
settingsText_.reset([self newLabelWithFrame:headerFrame]);
- [settingsText_ setAutoresizingMask:NSViewMinYMargin];
[settingsText_ setTextColor:
gfx::SkColorToCalibratedNSColor(message_center::kRegularTextColor)];
[settingsText_
@@ -161,7 +159,6 @@ void NotifierSettingsObserverMac::NotifierGroupChanged() {
NSWidth(fullFrame),
NSHeight(fullFrame));
detailsText_.reset([self newLabelWithFrame:subheaderFrame]);
- [detailsText_ setAutoresizingMask:NSViewMinYMargin];
[detailsText_ setTextColor:
gfx::SkColorToCalibratedNSColor(message_center::kDimTextColor)];
[detailsText_
@@ -186,8 +183,10 @@ void NotifierSettingsObserverMac::NotifierGroupChanged() {
NSWidth(fullFrame),
NSHeight(fullFrame));
groupDropDownButton_.reset(
- [[NSPopUpButton alloc] initWithFrame:dropDownButtonFrame
- pullsDown:YES]);
+ [[MCDropDown alloc] initWithFrame:dropDownButtonFrame pullsDown:YES]);
+ [groupDropDownButton_
+ setBackgroundColor:gfx::SkColorToCalibratedNSColor(
+ message_center::kMessageCenterBackgroundColor)];
[groupDropDownButton_ setAction:@selector(notifierGroupSelectionChanged:)];
[groupDropDownButton_ setTarget:self];
// Add a dummy item for pull-down.

Powered by Google App Engine
This is Rietveld 408576698