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

Unified Diff: ui/views/bubble/bubble_dialog_delegate.cc

Issue 2640593002: Fix alignment of title/content on the OIB / Site Settings bubble. (Closed)
Patch Set: respond to comments Created 3 years, 11 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/views/bubble/bubble_dialog_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_dialog_delegate.cc
diff --git a/ui/views/bubble/bubble_dialog_delegate.cc b/ui/views/bubble/bubble_dialog_delegate.cc
index 59839479a40b04f1e4cf2c48deb5b9666dfede6f..735a2237bcb536fb0bb272a2fa06b6abff199ae6 100644
--- a/ui/views/bubble/bubble_dialog_delegate.cc
+++ b/ui/views/bubble/bubble_dialog_delegate.cc
@@ -104,12 +104,7 @@ ClientView* BubbleDialogDelegateView::CreateClientView(Widget* widget) {
NonClientFrameView* BubbleDialogDelegateView::CreateNonClientFrameView(
Widget* widget) {
- ViewsDelegate* views_delegate = ViewsDelegate::GetInstance();
- BubbleFrameView* frame = new BubbleFrameView(
- views_delegate ? views_delegate->GetDialogFrameViewInsets()
- : gfx::Insets(kPanelVertMargin, kPanelHorizMargin, 0,
- kPanelHorizMargin),
- margins());
+ BubbleFrameView* frame = new BubbleFrameView(title_margins_, margins_);
// Note: In CreateBubble, the call to SizeToContents() will cause
// the relayout that this call requires.
frame->SetTitleFontList(GetTitleFontList());
@@ -220,10 +215,13 @@ BubbleDialogDelegateView::BubbleDialogDelegateView(View* anchor_view,
accept_events_(true),
adjust_if_offscreen_(true),
parent_window_(NULL) {
- margins_ = ViewsDelegate::GetInstance()
- ? ViewsDelegate::GetInstance()->GetBubbleDialogMargins()
- : gfx::Insets(kPanelVertMargin, kPanelHorizMargin,
- kPanelVertMargin, kPanelHorizMargin);
+ ViewsDelegate* views_delegate = ViewsDelegate::GetInstance();
+ margins_ = views_delegate ? views_delegate->GetBubbleDialogMargins()
+ : gfx::Insets(kPanelVertMargin, kPanelHorizMargin);
+ title_margins_ = views_delegate
+ ? views_delegate->GetDialogFrameViewInsets()
+ : gfx::Insets(kPanelVertMargin, kPanelHorizMargin, 0,
+ kPanelHorizMargin);
if (anchor_view)
SetAnchorView(anchor_view);
UpdateColorsFromTheme(GetNativeTheme());
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698