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

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

Issue 2550323004: views: support Harmony title insets (Closed)
Patch Set: Created 4 years 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/chrome_views_delegate.h ('k') | ui/views/views_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 74067861c6d312c640353abf9b13f16680915932..30478182968174d0c4b9cc607feb2362711379c1 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -544,6 +544,16 @@ int ChromeViewsDelegate::GetDialogRelatedButtonHorizontalSpacing() {
return ViewsDelegate::GetDialogRelatedButtonHorizontalSpacing();
}
+gfx::Insets ChromeViewsDelegate::GetDialogFrameViewInsets() {
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
+ // Titles are inset at the top and sides, but not at the bottom.
+ return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit,
+ HarmonyLayoutDelegate::kHarmonyLayoutUnit, 0,
+ HarmonyLayoutDelegate::kHarmonyLayoutUnit);
+ }
+ return ViewsDelegate::GetDialogFrameViewInsets();
+}
+
#if !defined(USE_ASH)
views::Widget::InitParams::WindowOpacity
ChromeViewsDelegate::GetOpacityForInitParams(
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.h ('k') | ui/views/views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698