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

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 2571613002: Convert Register Protocol Handler dialog for Harmony/Material Design (Closed)
Patch Set: Fixes from feedback Created 3 years, 11 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: chrome/browser/ui/views/chrome_views_delegate.cc
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
index 0b66f16c6f253790f8348d0e7f26a2467b9087f5..15ca525b976615f6f9290d58f89ef03ca8cd6798 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -548,6 +548,12 @@ int ChromeViewsDelegate::GetDialogRelatedButtonHorizontalSpacing() {
return ViewsDelegate::GetDialogRelatedButtonHorizontalSpacing();
}
+int ChromeViewsDelegate::GetDialogRelatedControlVerticalSpacing() {
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial())
+ return HarmonyLayoutDelegate::kHarmonyLayoutUnit / 2;
+ return ViewsDelegate::GetDialogRelatedControlVerticalSpacing();
+}
+
gfx::Insets ChromeViewsDelegate::GetDialogFrameViewInsets() {
if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
// Titles are inset at the top and sides, but not at the bottom.
@@ -558,6 +564,16 @@ gfx::Insets ChromeViewsDelegate::GetDialogFrameViewInsets() {
return ViewsDelegate::GetDialogFrameViewInsets();
}
+gfx::Insets ChromeViewsDelegate::GetBubbleDialogMargins() {
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
+ return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit,
msw 2017/01/06 23:17:43 optional nit: use the ctor that takes one |all| ar
kylix_rd 2017/01/10 14:36:44 Done.
+ HarmonyLayoutDelegate::kHarmonyLayoutUnit,
+ HarmonyLayoutDelegate::kHarmonyLayoutUnit,
+ HarmonyLayoutDelegate::kHarmonyLayoutUnit);
+ }
+ return ViewsDelegate::GetBubbleDialogMargins();
+}
+
#if !defined(USE_ASH)
views::Widget::InitParams::WindowOpacity
ChromeViewsDelegate::GetOpacityForInitParams(

Powered by Google App Engine
This is Rietveld 408576698