Chromium Code Reviews| Index: chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm |
| diff --git a/chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm b/chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm |
| index 5df8fd3cdf20853640149a5a7bd5c1a2234f0e8c..501b91f98f0a55dc83451964125cd87d5b876768 100644 |
| --- a/chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm |
| +++ b/chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm |
| @@ -14,6 +14,7 @@ |
| #include "chrome/grit/generated_resources.h" |
| #include "skia/ext/skia_utils_mac.h" |
| #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTweaker.h" |
| +#include "third_party/skia/include/core/SkColor.h" |
| #import "ui/base/cocoa/controls/hyperlink_button_cell.h" |
| #include "ui/base/l10n/l10n_util_mac.h" |
| #include "ui/base/resource/resource_bundle.h" |
| @@ -63,6 +64,9 @@ const CGFloat kTableRowViewVerticalPadding = 1.0f; |
| // Distance between the adapter off help link and the scroll view boundaries. |
| const CGFloat kAdapterOffHelpLinkPadding = 5.0f; |
| +// Background color of the footnote view. |
| +const SkColor kFootnoteBackgroundColor = SkColorSetRGB(245, 245, 245); |
| + |
| // The lookup table for signal strength level image. |
| const int kSignalStrengthLevelImageIds[5] = {IDR_SIGNAL_0_BAR, IDR_SIGNAL_1_BAR, |
| IDR_SIGNAL_2_BAR, IDR_SIGNAL_3_BAR, |
| @@ -567,8 +571,9 @@ void ChooserContentViewController::UpdateTableView() { |
| // Separator. |
| CGFloat separatorOriginX = 0.0f; |
| - CGFloat separatorOriginY = kMarginY + helpButtonHeight + kVerticalPadding; |
| - [separator_ setFrameOrigin:NSMakePoint(separatorOriginX, separatorOriginY)]; |
| + separatorOriginY_ = kMarginY + helpButtonHeight + kVerticalPadding; |
| + [separator_ |
| + setFrameOrigin:NSMakePoint(separatorOriginX, separatorOriginY_)]; |
| [self addSubview:separator_]; |
| // Help button. |
| @@ -878,4 +883,11 @@ void ChooserContentViewController::UpdateTableView() { |
| return [tableRowView pairedStatus]; |
| } |
| +- (void)drawRect:(NSRect)rect { |
| + [skia::SkColorToCalibratedNSColor(kFootnoteBackgroundColor) setFill]; |
|
Robert Sesek
2016/11/10 22:01:08
I'd use +[NSColor colorWithCalibratedWhite:245.0 /
juncai
2016/11/11 01:46:33
Done.
|
| + NSRect footnoteFrame = NSMakeRect(0, 0, kChooserWidth, separatorOriginY_); |
| + NSRectFill(footnoteFrame); |
| + [super drawRect:footnoteFrame]; |
| +} |
| + |
| @end |