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

Unified Diff: chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm

Issue 2488383002: Modify WebBluetooth chooser based on UI review feedback (Closed)
Patch Set: modify WebBluetooth chooser based on UI review feedback Created 4 years, 1 month 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 | « chrome/browser/ui/cocoa/chooser_content_view_cocoa.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/ui/cocoa/chooser_content_view_cocoa.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698