Chromium Code Reviews| Index: ui/views/window/dialog_client_view.cc |
| diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc |
| index c46942a5bf96a16f0bf98fdde31c6b6a670ea0cd..2950d2a0a977b3d1e37b4b4ed9030f8d0d991c47 100644 |
| --- a/ui/views/window/dialog_client_view.cc |
| +++ b/ui/views/window/dialog_client_view.cc |
| @@ -220,8 +220,17 @@ void DialogClientView::Layout() { |
| extra_view_->SetBoundsRect(row_bounds); |
| } |
| - if (height > 0) |
| - bounds.Inset(0, 0, 0, height + kRelatedControlVerticalSpacing); |
| + if (height > 0) { |
| + // If the ViewsDelegate supplies a non-zero top inset, use that; |
|
sky
2016/11/23 20:28:37
Might the ViewsDelegate supply 0?
Elly Fong-Jones
2016/11/28 17:02:49
Yes - in non-Harmony mode, ChromeViewsDelegate::Ge
sky
2016/11/28 17:44:35
If it returns 0 then you fallback to using the kRe
sky
2016/11/28 19:05:05
I don't think I'm being clear. Let me try again.
I
|
| + // otherwise, use kRelatedControlVerticalSpacing. |
| + int spacing = |
| + ViewsDelegate::GetInstance() |
| + ? ViewsDelegate::GetInstance()->GetDialogButtonInsets().top() |
| + : 0; |
| + if (!spacing) |
| + spacing = kRelatedControlVerticalSpacing; |
| + bounds.Inset(0, 0, 0, height + spacing); |
| + } |
| } |
| // Layout the contents view to the top and side edges of the contents bounds. |