Commit f18dc482 authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

views: remove unnecessary padding in bubbles with title and message

When there is both a title and message, the padding isn't needed, since
it is intended to visually take the place of the message.

Bug: 771515
Change-Id: Ia29be37ae2f2049da254e4ea4874fb28f073961e
Reviewed-on: https://chromium-review.googlesource.com/700400
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506544}
parent 54d8a415
......@@ -387,14 +387,14 @@ void ContentSettingBubbleContents::Init() {
if (!bubble_content.message.empty()) {
views::Label* message_label = new views::Label(
bubble_content.message, views::style::CONTEXT_LABEL, STYLE_SECONDARY);
// For bubbles without titles there is no need for padding.
if (!bubble_content.title.empty() && provider->UseExtraDialogPadding())
layout->AddPaddingRow(0, unrelated_control_vertical_spacing);
message_label->SetMultiLine(true);
message_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
layout->StartRow(0, kSingleColumnSetId);
layout->AddView(message_label);
bubble_content_empty = false;
} else if (!bubble_content.title.empty() &&
provider->UseExtraDialogPadding()) {
layout->AddPaddingRow(0, unrelated_control_vertical_spacing);
}
// Layout for the item list (blocked plugins and popups).
......
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