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

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: Fix unit tests to use a ViewsDelegate to guard against crashes 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..848e3407ce8be06454b92e82f12ac1834ebda554 100644
--- a/ui/views/bubble/bubble_dialog_delegate.cc
+++ b/ui/views/bubble/bubble_dialog_delegate.cc
@@ -216,12 +216,14 @@ 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
+ ? views_delegate->GetInsetsMetric(InsetsMetric::BUBBLE_DIALOG)
+ : gfx::Insets(kPanelVertMargin, kPanelHorizMargin);
+ title_margins_ =
+ views_delegate
+ ? views_delegate->GetInsetsMetric(InsetsMetric::DIALOG_FRAME_VIEW)
+ : gfx::Insets(kPanelVertMargin, kPanelHorizMargin, 0,
+ kPanelHorizMargin);
if (anchor_view)
SetAnchorView(anchor_view);
UpdateColorsFromTheme(GetNativeTheme());

Powered by Google App Engine
This is Rietveld 408576698