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

Side by Side Diff: ui/views/window/dialog_client_view.cc

Issue 13925019: fix GridLayout::CreatePanel for new style dialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: msw review Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/layout/layout_constants.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/window/dialog_client_view.h" 5 #include "ui/views/window/dialog_client_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/base/keycodes/keyboard_codes.h" 9 #include "ui/base/keycodes/keyboard_codes.h"
10 #include "ui/views/controls/button/label_button.h" 10 #include "ui/views/controls/button/label_button.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 cancel_button_ ? cancel_button_->GetPreferredSize().height() : 0); 365 cancel_button_ ? cancel_button_->GetPreferredSize().height() : 0);
366 return std::max(extra_view_height, buttons_height); 366 return std::max(extra_view_height, buttons_height);
367 } 367 }
368 368
369 gfx::Insets DialogClientView::GetButtonRowInsets() const { 369 gfx::Insets DialogClientView::GetButtonRowInsets() const {
370 if (GetButtonsAndExtraViewRowHeight() == 0) 370 if (GetButtonsAndExtraViewRowHeight() == 0)
371 return gfx::Insets(); 371 return gfx::Insets();
372 372
373 // NOTE: The insets only apply to the buttons, extra view, and footnote view. 373 // NOTE: The insets only apply to the buttons, extra view, and footnote view.
374 return DialogDelegate::UseNewStyle() ? 374 return DialogDelegate::UseNewStyle() ?
375 gfx::Insets(0, 20, 20, 20) : 375 gfx::Insets(0, kButtonHEdgeMarginNew,
376 kButtonVEdgeMarginNew, kButtonHEdgeMarginNew) :
376 gfx::Insets(0, kButtonHEdgeMargin, 377 gfx::Insets(0, kButtonHEdgeMargin,
377 kButtonVEdgeMargin, kButtonHEdgeMargin); 378 kButtonVEdgeMargin, kButtonHEdgeMargin);
378 } 379 }
379 380
380 void DialogClientView::Close() { 381 void DialogClientView::Close() {
381 GetWidget()->Close(); 382 GetWidget()->Close();
382 GetDialogDelegate()->OnClose(); 383 GetDialogDelegate()->OnClose();
383 } 384 }
384 385
385 } // namespace views 386 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/layout/layout_constants.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698