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

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: Reduced ViewsDelegate layout/metric functions to only two functions Created 3 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
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..b22ed83910101802142310c9f81e34f211063d0d 100644
--- a/ui/views/bubble/bubble_dialog_delegate.cc
+++ b/ui/views/bubble/bubble_dialog_delegate.cc
@@ -216,10 +216,13 @@ 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);
+ margins_ = views_delegate
+ ? views_delegate->GetInsetsMetric(
+ ViewsDelegate::InsetsMetric::BUBBLE_DIALOG)
+ : gfx::Insets(kPanelVertMargin, kPanelHorizMargin);
title_margins_ = views_delegate
- ? views_delegate->GetDialogFrameViewInsets()
+ ? views_delegate->GetInsetsMetric(
+ ViewsDelegate::InsetsMetric::DIALOG_FRAME_VIEW)
: gfx::Insets(kPanelVertMargin, kPanelHorizMargin, 0,
kPanelHorizMargin);
if (anchor_view)

Powered by Google App Engine
This is Rietveld 408576698