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

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: edits 2 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
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 775f54d9815b039505f80e17a8266c9091a481d9..9a19e95e1c000dd21343eed02b563a6aac0b3761 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));
@@ -342,7 +342,8 @@ void DialogClientView::SetupLayout() {
// Support dialogs that clear |button_row_insets_| to do their own layout.
// They expect GetDialogRelatedControlVerticalSpacing() in this case.
// TODO(tapted): Remove this under Harmony.
Peter Kasting 2017/05/18 00:00:07 Nit: Remove TODO?
Bret 2017/05/18 00:50:06 Done.
- 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());
« chrome/browser/ui/views/task_manager_view.cc ('K') | « ui/views/layout/layout_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698