Commit 046eb21b authored by David Black's avatar David Black Committed by Commit Bot

Fix multiline label in AssistantOnboardingSuggestionView.

The label is being given only enough height for a single line of text
despite being a multiline line label with max of 2 lines.

Bug: b:169806293
Change-Id: I8d9374270dff1a0aa43c6b397aea0462474efe2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2441685Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Commit-Queue: David Black <dmblack@google.com>
Cr-Commit-Position: refs/heads/master@{#812845}
parent 33ebdcf6
......@@ -216,6 +216,10 @@ void AssistantOnboardingSuggestionView::InitLayout(
views::FlexSpecification(views::MinimumFlexSizeRule::kScaleToZero,
views::MaximumFlexSizeRule::kUnbounded));
label_->SetText(base::UTF8ToUTF16(suggestion.text));
// Workaround issue where multiline label is not allocated enough height.
label_->SetPreferredSize(
gfx::Size(label_->GetPreferredSize().width(), 2 * kLabelLineHeight));
}
void AssistantOnboardingSuggestionView::UpdateIcon(const gfx::ImageSkia& icon) {
......
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