Commit 53d4f417 authored by Dominique Fauteux-Chapleau's avatar Dominique Fauteux-Chapleau Committed by Commit Bot

Stop resizing DeepScanningDialogViews on success case

Change-Id: I3abb5674b5c751e3bd1420dcf86db7115d630649
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2153318Reviewed-by: default avatarDaniel Rubery <drubery@chromium.org>
Commit-Queue: Dominique Fauteux-Chapleau <domfc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760935}
parent b9d8ee54
......@@ -313,12 +313,12 @@ void DeepScanningDialogViews::UpdateDialog() {
// Update the message's text.
message_->SetText(GetDialogMessage());
// Resize the dialog's height. This is needed since the button might be
// removed (in the success case) and the text might take fewer or more lines.
// Resize the dialog's height. This is needed since the text might take more
// lines after changing.
int text_height = message_->GetRequiredLines() * message_->GetLineHeight();
int row_height = message_->parent()->height();
int height_to_add = std::max(text_height - row_height, 0);
if (is_success() || (height_to_add > 0))
if (height_to_add > 0)
Resize(height_to_add);
// Update the dialog.
......
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