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

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: Address nits. 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/message_center/cocoa/settings_controller.h ('k') | ui/message_center/cocoa/settings_entry_view.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0bf9d5af08f170674ec4631430958eec0779e960 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,11 @@ 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 backgroundColor:color];
+
return label;
}
@@ -141,7 +141,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 +160,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 +184,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.
« no previous file with comments | « ui/message_center/cocoa/settings_controller.h ('k') | ui/message_center/cocoa/settings_entry_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698