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

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

Issue 2888563004: Delete panel metrics and define insets in terms of distance metrics. (Closed)
Patch Set: one wrong conversion Created 3 years, 7 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
« no previous file with comments | « ui/views/layout/layout_provider.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 094d098e299b5c7a4d9569c5fbad0d282d2ef40b..a4be18a4f0adcb9aa21c435728453e47a0a92712 100644
--- a/ui/views/window/dialog_client_view.cc
+++ b/ui/views/window/dialog_client_view.cc
@@ -77,7 +77,7 @@ class DialogClientView::ButtonRowContainer : public View {
DialogClientView::DialogClientView(Widget* owner, View* contents_view)
: ClientView(owner, contents_view),
button_row_insets_(
- LayoutProvider::Get()->GetInsetsMetric(INSETS_DIALOG_BUTTON)) {
+ LayoutProvider::Get()->GetInsetsMetric(INSETS_DIALOG_BUTTON_ROW)) {
// Doing this now ensures this accelerator will have lower priority than
// one set by the contents view.
AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_NONE));
@@ -347,8 +347,8 @@ void DialogClientView::SetupLayout() {
LayoutProvider* const layout_provider = LayoutProvider::Get();
// Support dialogs that clear |button_row_insets_| to do their own layout.
// They expect GetDialogRelatedControlVerticalSpacing() in this case.
- // TODO(tapted): Remove this under Harmony.
- if (insets.top() == 0) {
+ if (insets.top() == 0 &&
+ !ui::MaterialDesignController::IsSecondaryUiMaterial()) {
const int top =
layout_provider->GetDistanceMetric(DISTANCE_RELATED_CONTROL_VERTICAL);
insets.Set(top, insets.left(), insets.bottom(), insets.right());
« no previous file with comments | « ui/views/layout/layout_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698