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

Unified Diff: chrome/browser/ui/views/global_error_bubble_view.cc

Issue 962013002: Left align bubble title and text, adjusted spacing between. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/global_error_bubble_view.cc
diff --git a/chrome/browser/ui/views/global_error_bubble_view.cc b/chrome/browser/ui/views/global_error_bubble_view.cc
index 1fae5f6ecac3155877a94062b443328ea69685e0..fbdb6982cbfeaa2650a483711af623e27f78f0e6 100644
--- a/chrome/browser/ui/views/global_error_bubble_view.cc
+++ b/chrome/browser/ui/views/global_error_bubble_view.cc
@@ -35,7 +35,10 @@ const int kMaxBubbleViewWidth = 262;
// The vertical inset of the wrench bubble anchor from the wrench menu button.
const int kAnchorVerticalInset = 5;
-const int kBubblePadding = 6;
+const int kBubblePadding = 19;
+
+// Spacing between bubble text and buttons.
+const int kLabelToButtonVerticalSpacing = 14;
} // namespace
@@ -67,6 +70,10 @@ GlobalErrorBubbleView::GlobalErrorBubbleView(
: BubbleDelegateView(anchor_view, arrow),
browser_(browser),
error_(error) {
+ // Set content margins to left-align the bubble text with the title.
+ // BubbleFrameView adds enough padding below title, no top padding needed.
+ set_margins(gfx::Insets(0, kBubblePadding, kBubblePadding, kBubblePadding));
+
// Compensate for built-in vertical padding in the anchor view's image.
set_anchor_view_insets(
gfx::Insets(kAnchorVerticalInset, 0, kAnchorVerticalInset, 0));
@@ -105,9 +112,6 @@ GlobalErrorBubbleView::GlobalErrorBubbleView(
views::GridLayout* layout = new views::GridLayout(this);
SetLayoutManager(layout);
- // BubbleFrameView adds enough padding below title, no top padding needed.
- layout->SetInsets(0, kBubblePadding, kBubblePadding, kBubblePadding);
-
// First row, message labels.
views::ColumnSet* cs = layout->AddColumnSet(0);
cs->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL,
@@ -130,7 +134,7 @@ GlobalErrorBubbleView::GlobalErrorBubbleView(
if (i < message_labels.size() - 1)
layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
}
- layout->AddPaddingRow(0, views::kLabelToControlVerticalSpacing);
+ layout->AddPaddingRow(0, kLabelToButtonVerticalSpacing);
layout->StartRow(0, 1);
layout->AddView(accept_button.release());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698