summaryrefslogtreecommitdiffstats
path: root/views/window
diff options
context:
space:
mode:
Diffstat (limited to 'views/window')
-rw-r--r--views/window/dialog_client_view.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/views/window/dialog_client_view.cc b/views/window/dialog_client_view.cc
index d5574fa..28c721c 100644
--- a/views/window/dialog_client_view.cc
+++ b/views/window/dialog_client_view.cc
@@ -393,7 +393,8 @@ void DialogClientView::LayoutDialogButtons() {
if (cancel_button_) {
gfx::Size ps = cancel_button_->GetPreferredSize();
gfx::Rect lb = GetLocalBounds(false);
- int button_width = GetButtonWidth(MessageBoxFlags::DIALOGBUTTON_CANCEL);
+ int button_width = std::max(
+ GetButtonWidth(MessageBoxFlags::DIALOGBUTTON_CANCEL), ps.width());
int button_x = lb.right() - button_width - kButtonHEdgeMargin;
int button_y = lb.bottom() - ps.height() - kButtonVEdgeMargin;
cancel_button_->SetBounds(button_x, button_y, button_width, ps.height());
@@ -404,7 +405,8 @@ void DialogClientView::LayoutDialogButtons() {
if (ok_button_) {
gfx::Size ps = ok_button_->GetPreferredSize();
gfx::Rect lb = GetLocalBounds(false);
- int button_width = GetButtonWidth(MessageBoxFlags::DIALOGBUTTON_OK);
+ int button_width = std::max(
+ GetButtonWidth(MessageBoxFlags::DIALOGBUTTON_OK), ps.width());
int ok_button_right = lb.right() - kButtonHEdgeMargin;
if (cancel_button_)
ok_button_right = cancel_button_->x() - kRelatedButtonHSpacing;