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

Unified Diff: ui/views/window/dialog_client_view.cc

Issue 2526863004: harmony: fix collected cookies dialog spacing and button insets (Closed)
Patch Set: Created 4 years, 1 month 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/collected_cookies_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/browser/ui/views/collected_cookies_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698