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

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

Issue 2505973003: harmony: use Harmony sizing for ViewsDelegate sizing functions (Closed)
Patch Set: move constant 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
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 1361b73dd0a57d753d0a9a831b0b1be7ce8595a1..3d66274647c07cd4dde40679454665a7c93361e0 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -21,12 +21,14 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/browser_window_state.h"
+#include "chrome/browser/ui/views/harmony/harmony_layout_delegate.h"
#include "chrome/grit/chrome_unscaled_resources.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "components/version_info/version_info.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/context_factory.h"
+#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_switches.h"
#include "ui/display/display.h"
@@ -509,6 +511,18 @@ ChromeViewsDelegate::GetBlockingPoolTaskRunner() {
return content::BrowserThread::GetBlockingPool();
}
+gfx::Insets ChromeViewsDelegate::GetDialogButtonInsets() {
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial())
+ return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit);
+ return ViewsDelegate::GetDialogButtonInsets();
+}
+
+int ChromeViewsDelegate::GetDialogRelatedButtonHorizontalSpacing() {
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial())
+ return HarmonyLayoutDelegate::kHarmonyLayoutUnit / 2;
+ return ViewsDelegate::GetDialogRelatedButtonHorizontalSpacing();
+}
+
#if !defined(USE_ASH)
views::Widget::InitParams::WindowOpacity
ChromeViewsDelegate::GetOpacityForInitParams(
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.h ('k') | chrome/browser/ui/views/harmony/harmony_layout_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698