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

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

Issue 187133003: linux_aura: Fix all instances of LabelButton sizing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert on the right branch. Created 6 years, 9 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/controls/button/label_button.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/events/keycodes/keyboard_codes.h" 9 #include "ui/events/keycodes/keyboard_codes.h"
10 #include "ui/views/background.h" 10 #include "ui/views/background.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 GetDialogDelegate()->GetDefaultDialogButton() == type && 376 GetDialogDelegate()->GetDefaultDialogButton() == type &&
377 GetDialogDelegate()->ShouldDefaultButtonBeBlue()) { 377 GetDialogDelegate()->ShouldDefaultButtonBeBlue()) {
378 button = new BlueButton(this, title); 378 button = new BlueButton(this, title);
379 } else { 379 } else {
380 button = new LabelButton(this, title); 380 button = new LabelButton(this, title);
381 button->SetStyle(Button::STYLE_BUTTON); 381 button->SetStyle(Button::STYLE_BUTTON);
382 } 382 }
383 button->SetFocusable(true); 383 button->SetFocusable(true);
384 384
385 const int kDialogMinButtonWidth = 75; 385 const int kDialogMinButtonWidth = 75;
386 button->set_min_width(kDialogMinButtonWidth); 386 button->set_min_size(gfx::Size(kDialogMinButtonWidth, 0));
387 button->SetGroup(kButtonGroup); 387 button->SetGroup(kButtonGroup);
388 return button; 388 return button;
389 } 389 }
390 390
391 void DialogClientView::UpdateButton(LabelButton* button, 391 void DialogClientView::UpdateButton(LabelButton* button,
392 ui::DialogButton type) { 392 ui::DialogButton type) {
393 DialogDelegate* dialog = GetDialogDelegate(); 393 DialogDelegate* dialog = GetDialogDelegate();
394 button->SetText(dialog->GetDialogButtonLabel(type)); 394 button->SetText(dialog->GetDialogButtonLabel(type));
395 button->SetEnabled(dialog->IsDialogButtonEnabled(type)); 395 button->SetEnabled(dialog->IsDialogButtonEnabled(type));
396 396
(...skipping 18 matching lines...) Expand all
415 gfx::Insets(0, kButtonHEdgeMarginNew, 415 gfx::Insets(0, kButtonHEdgeMarginNew,
416 kButtonVEdgeMarginNew, kButtonHEdgeMarginNew); 416 kButtonVEdgeMarginNew, kButtonHEdgeMarginNew);
417 } 417 }
418 418
419 void DialogClientView::Close() { 419 void DialogClientView::Close() {
420 GetWidget()->Close(); 420 GetWidget()->Close();
421 GetDialogDelegate()->OnClosed(); 421 GetDialogDelegate()->OnClosed();
422 } 422 }
423 423
424 } // namespace views 424 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/label_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698