Commit 155623f0 authored by Peter Boström's avatar Peter Boström Committed by Commit Bot

Enable modal-dialog width in BubbleDialogModelHost

Widens modal dialogs from 320dp to 448dp, which is currently only
WindowNamePrompt.

Bug: 1106422
Change-Id: Id8db619b09bdb8cff8f6caaa3def215178558565
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2453895
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814388}
parent 6ab44784
...@@ -187,8 +187,11 @@ void BubbleDialogModelHost::OnDialogInitialized() { ...@@ -187,8 +187,11 @@ void BubbleDialogModelHost::OnDialogInitialized() {
} }
gfx::Size BubbleDialogModelHost::CalculatePreferredSize() const { gfx::Size BubbleDialogModelHost::CalculatePreferredSize() const {
// TODO(pbos): Move DISTANCE_BUBBLE_PREFERRED_WIDTH into views. // TODO(pbos): Move DISTANCE_BUBBLE_PREFERRED_WIDTH and
const int width = 320 - margins().width(); // DISTANCE_MODAL_DIALOG_PREFERRED_WIDTH into views. 320 and 448 are inlined
// versions of these.
const int width =
(GetModalType() == ui::MODAL_TYPE_NONE ? 320 : 448) - margins().width();
return gfx::Size(width, GetHeightForWidth(width)); return gfx::Size(width, GetHeightForWidth(width));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment