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

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

Issue 2696263002: Refactor ViewsDelegate and MD-ify the icon-to-text spacing for checkbox and radiobutton (Closed)
Patch Set: Used ifdef instead of duplicated code for delegate initialization Created 3 years, 9 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 | « chrome/browser/ui/views/toolbar/reload_button_unittest.cc ('k') | ui/views/bubble/bubble_frame_view.cc » ('j') | 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 735a2237bcb536fb0bb272a2fa06b6abff199ae6..c32f4c318563393afd5926e32ecb73200db9f805 100644
--- a/ui/views/bubble/bubble_dialog_delegate.cc
+++ b/ui/views/bubble/bubble_dialog_delegate.cc
@@ -216,12 +216,9 @@ BubbleDialogDelegateView::BubbleDialogDelegateView(View* anchor_view,
adjust_if_offscreen_(true),
parent_window_(NULL) {
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);
+ margins_ = views_delegate->GetInsetsMetric(InsetsMetric::BUBBLE_DIALOG);
+ title_margins_ =
+ views_delegate->GetInsetsMetric(InsetsMetric::DIALOG_FRAME_VIEW);
if (anchor_view)
SetAnchorView(anchor_view);
UpdateColorsFromTheme(GetNativeTheme());
« no previous file with comments | « chrome/browser/ui/views/toolbar/reload_button_unittest.cc ('k') | ui/views/bubble/bubble_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698