Chromium Code Reviews| Index: chrome/browser/ui/views/session_crashed_bubble_view.cc |
| diff --git a/chrome/browser/ui/views/session_crashed_bubble_view.cc b/chrome/browser/ui/views/session_crashed_bubble_view.cc |
| index ef43a73ed20883f69e3d5047ada5ae3ad06633d7..03de3cd7c365d7b9a68a143db99d6905a65db1f9 100644 |
| --- a/chrome/browser/ui/views/session_crashed_bubble_view.cc |
| +++ b/chrome/browser/ui/views/session_crashed_bubble_view.cc |
| @@ -55,6 +55,9 @@ const int kWidthOfDescriptionText = 320; |
| // Distance between checkbox and the text to the right of it. |
| const int kCheckboxTextDistance = 4; |
| +// Bottom inset for UMA opt-in view in pixels. |
|
msw
2014/09/19 18:01:48
nit: be consistent about "optin" vs. "opt-in" in c
yao
2014/10/09 20:38:40
Done.
|
| +const int kUMAOptinViewBottomInset = 10; |
|
msw
2014/09/19 18:01:48
nit: This could be moved into the scope of the one
yao
2014/10/09 20:38:40
Done.
|
| + |
| // The color of the text and background of the sub panel to offer UMA optin. |
| // These values match the BookmarkSyncPromoView colors. |
| const SkColor kBackgroundColor = SkColorSetRGB(245, 245, 245); |
| @@ -336,6 +339,9 @@ views::View* SessionCrashedBubbleView::CreateUMAOptinView() { |
| gfx::Range after_link_range(offset + link_text.length(), uma_text.length()); |
| if (!after_link_range.is_empty()) |
| uma_label->AddStyleRange(after_link_range, uma_style); |
| + // Since the checkbox has a bigger height than text, moves it down by 1px to |
|
msw
2014/09/19 18:01:48
nit: consider "Shift the text down by 1px to align
yao
2014/10/09 20:38:40
Done.
|
| + // make them look aligned. |
| + uma_label->SetBorder(views::Border::CreateEmptyBorder(1, 0, 0, 0)); |
|
sky
2014/09/22 15:06:34
This only works with the default font on windows.
|
| // Create a view to hold the checkbox and the text. |
| views::View* uma_view = new views::View(); |
| @@ -346,7 +352,7 @@ views::View* SessionCrashedBubbleView::CreateUMAOptinView() { |
| views::Background::CreateSolidBackground(kBackgroundColor)); |
| int inset_left = GetBubbleFrameView()->GetTitleInsets().left(); |
| uma_layout->SetInsets(views::kRelatedControlVerticalSpacing, inset_left, |
| - views::kRelatedControlVerticalSpacing, inset_left); |
| + kUMAOptinViewBottomInset, inset_left); |
| const int kReportColumnSetId = 0; |
| views::ColumnSet* cs = uma_layout->AddColumnSet(kReportColumnSetId); |